ROS Commands

Launch rosbridge server:

ros2 launch rosbridge_server rosbridge_websocket_launch.xml

 

Publish a message on a certain topic:

ros2 topic pub /my_topic std_msgs/String "data: Hello world"

 

Record all topics to a rosbag called “cerebra”:

ros2 bag record -a -o cerebra

 

Record certain topics to a rosbag:

 

Remove messages older than an hour inside a rosbag: