ROS2 Basics 1
December 18, 2022
0.1 Basic turtle Sim
$ sudo apt install ros-foxy-turtlesim
$ ros2 pkg executables turtlesim
$ ros2 run <pkg-name> <executable>
$ros2 run turtlesim turtlesim_node
$ ros2 run turtlesim turtle_teleop_key
$ ros2 node list
/turtlesim
/teleop_turtle
$ ros2 node info /turtlesim
$ ros2 topic list
$ ros2 topic info /turtle1/cmd_vel
$ ros2 topic echo /turtle1/cmd_vel
$ ros2 interface show geometry_msgs/msg/Twist
$ ros2 topic pub --help
$ ros2 topic pub <topic_name> <Message_type> <message_in_YAML>
$ ros2 topic pub /turtle1/cmd_vel geometry_msgs/msg/Twist "{linear: {x:2.0, y:0.0, z:0.0 }, ang
$ ros2 service list
$
1
0.2 Nodes and Topics
0.3 Message Passing
0.4 ROS Services
[ ]: