0% found this document useful (0 votes)
1K views2 pages

ROS2 Basics 1

This document provides an introduction to ROS2 basics including running the turtlesim simulator, listing and viewing nodes and topics, publishing messages to topics, and an overview of messages, services, and message passing in ROS2. It shows commands for installing turtlesim, running turtlesim nodes, viewing node and topic information, publishing velocity commands to turtles, and listing available services. The document is divided into sections on turtlesim, nodes and topics, message passing, and ROS services.

Uploaded by

Nirban Das
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1K views2 pages

ROS2 Basics 1

This document provides an introduction to ROS2 basics including running the turtlesim simulator, listing and viewing nodes and topics, publishing messages to topics, and an overview of messages, services, and message passing in ROS2. It shows commands for installing turtlesim, running turtlesim nodes, viewing node and topic information, publishing velocity commands to turtles, and listing available services. The document is divided into sections on turtlesim, nodes and topics, message passing, and ROS services.

Uploaded by

Nirban Das
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
  • Basic turtle Sim
  • Overview of Topics

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
[ ]:

You might also like