ROS2 CLI Cheetsheet

Configuring environment

source /opt/ros/foxy/setup.bash

echo “source /opt/ros/foxy/setup.bash” >> ~/.bashrc

printenv | grep -i ROS

Using turtlesimros2, and rqt

ros2 pkg executables


Understanding nodes

ros2 node list

ros2 run

ros2 node info

Understanding topics


ros2 topic list

ros2 topic echo

ros2 topic info

ros2 interface show

ros2 topic pub

ros2 topic hz

Understanding services

ros2 service list

ros2 service type

ros2 service find

ros2 interface show

ros2 service call

Understanding parameters

ros2 param list

ros2 param get

ros2 param set

ros2 param dump

ros2 param load

ros2 run <package_name> <executable_name> –ros-args –params-file <file_name>

Understanding actions

ros2 node info

ros2 action list

ros2 action list -t

ros2 action info

ros2 interface show

ros2 action send_goal

Using rqt_console to view logs

ros2 run rqt_console rqt_console

Launching nodes

ros2 launch

Recording and playing back data

ros2 bag record

ros2 bag info

ros2 bag play


您的电子邮箱地址不会被公开。 必填项已用 * 标注