개발하는 핑구
article thumbnail
[ROS2 시작하기 - 7] Launch
Robotics/ROS2 2023. 3. 2. 13:37

ROS2 Launch file Launch file will allow you to start many nodes from one single file. you will be able to quickly launch your application and to create different launch files for different nodes of you robot. Create and Install a Launch File cd ros2_ws/src/ ros2 pkg create my_robot_bringup cd my_robot_bringup rm -rf include/ src/ mkdir launch In CMakeLists.txt, remove some codes and in order to ..

article thumbnail
[ROS2 시작하기 - 6] Parameter
Robotics/ROS2 2023. 3. 1. 17:00

ROS2 Parameter Settings for your nodes, value set at run time A Parameter is specific to a node ROS2 Parameter types boolean, int, double, string, lists, … Declare your parameter number_publisher.cpp #include "rclcpp/rclcpp.hpp" #include "example_interfaces/msg/int64.hpp" class NumberPublisherNode : public rclcpp::Node { public: NumberPublisherNode() : Node("number_publisher"), number_(2) { // a..

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 ..