개발하는 핑구
article thumbnail
[ROS2 시작하기 - 5] Interface
Robotics/ROS2 2023. 2. 27. 14:15

Create Custom ROS2 Interfaces (Msg and Srv) ROS2 can communicate with interfaces (msg or srv). How is it possible that you can use those interfaces directly in your code? Let’s say you create a message definition inside a package. when you use the colcon build, the message will be passed by the build system. the source code will be generated for this message in any ros2 surpported language C++, ..

article thumbnail
[ROS2 시작하기 - 4] Service
Robotics/ROS2 2023. 2. 24. 16:33

ROS2 Service A ROS2 Service is a client/server system Synchronous or asyncronous One Message type for Request, one message type for Response Can be written in python, c++, … directly inside ROS nodes A service server can only exist once, but can have many clients Example of service interface ros2 interface show example_interfaces/srv/AddTwoInts " int64 a # request int64 b # request --- int64 sum..

article thumbnail
[ROS2 시작하기 - 3] Topic
Robotics/ROS2 2023. 2. 23. 13:29

ROS2 Topics Topic is a message If publisher send FM signal over a topic, and if you are trying to decode AM signal on your phone, it will not work. publisher and subscriber must have same data structure we can have many publishers on a topic, and also have many subscribers on a topic On a view of a publisher or subscriber, a publisher is not aware of the other publishers and is not aware of who ..

article thumbnail
[ROS2 시작하기 - 2] Tools
Robotics/ROS2 2023. 2. 21. 16:26

ROS2 Tools # you can know the details of function ros2 -h # print now executing nodes ros2 node list # print the node's information ros2 node info [node`s name] # in your ~/.bashrc # you can not use ros2 functions without this line(ex. ros2 run ~) source /opt/ros/foxy/setup.bash # you can not use your local workspace nodes without this line source ~/ros2_ws/install/setup.bash source /usr/share/c..

article thumbnail
[ROS2 시작하기 - 1] Node
Robotics/ROS2 2023. 2. 20. 12:44

ROS2 Nodes Subprograms in your application, responsible for only one thing Combined into a graph for similar for nodes Communicate with each other through topics, sevices, and parameters Benefits Reduce code complexity Fault tolerance A critical node running your hardware that is well tested and you just add another new node in your program. Even if this later on node can rush, it will not affec..

article thumbnail
[ROS2 시작하기 - 0] 환경 셋팅
Robotics/ROS2 2023. 2. 19. 19:27

Setup Your Environment Install Oracle VM VirtualBox ubuntu-20.04.5-desktop-amd64.iso Environment Oracle VM VirtualBox OS : ubuntu 20.04 Configuration Memory Size : 4 or 8GB Hard disk file type : VDI Hard disk Size : 20 ~ 30GB Settings System → Processor → 3CPU Network → Attached to → Bridged Adapter Storage → Controller : IDE → Empty → Choose/Create a Virtual Optical Disk (your .iso) Installing ..

article thumbnail
ROS2와 DDS란?
Robotics/ROS2 2023. 2. 18. 15:05

What is ROS? ROS는 Robot Operating System의 약자로 메타운영체제이다. 윈도우나 리눅스, 안드로이드 같은 운영체제는 아니지만 로봇 애플리케이션 개발을 지원하는 일종의 소프트웨어 프레임워크이며, 기존 운영체제를 통해 메시지 전달, 패키지 관리, 개발환경에 필요한 라이브러리와 도구를 제공하는 등 일종의 미들웨어이다. 기존의 로봇 개발 방식은 하드웨어 설계부터 소프트웨어에 이르기까지 모든 것을 독자적으로 개발해야 했기 때문에 로봇마다 API 인터페이스가 다르고 이를 적용하는데 사전 학습이 필요했으며, 소프트웨어를 작성하는데 하드웨어에 대한 지식이 필요했다. 이런 한계를 극복하여 로봇 프로그래밍 생태계를 구축하고자 많은 종류의 로봇 소프트웨어 플랫폼이 생겼는데 그 중 하나가 ROS이..

article thumbnail
[프로그래머스] 2019 KAKAO BLIND RECRUITMENT - 길 찾기 게임(Python)
Problem Solving/Programmers 2023. 2. 16. 16:19

문제 https://school.programmers.co.kr/learn/courses/30/lessons/42892 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 풀이 이진트리 문제로 별다른 풀이법은 생각나지 않아 노드와 트리를 직접 구현했다. 노드의 data로 비교하는 것이 아닌 x, y 값으로 트리를 생성해야한다. 깊이가 0부터 순서대로 저장하기 위해 먼저 y를 내림차순으로 정렬한다. 노드는 x, y, data(노드의 번호) 그리고 자식 노드의 대한 값을 저장한다. 정렬했던 순서대로(깊이가 0인 노드부터) 노드들을 뽑아내며 x값을 비교해 왼쪽 서브..