Skip to content

shunsugar/sugar_ros2

Repository files navigation

sugar_ros2

This repository is for learning the basics, including ROS2 nodes and topics.

Setup⚙️

The following command will copy the sugar_ros2 directory to your workspace.

cd ~/ros2_ws/src
git clone https://github.com/shunsugar/sugar_ros2.git
cd ~/ros2_ws
colcon build
source ~/.bashrc

Publish various messages😏

The following 4 message types can be run.

std_msgs/String, geometry_msgs/Twist, sensor_msgs/LaserScan, and sensor_msgs/PointCloud2.

ros2 run simple_talker simple_talker_{MESSAGE_TYPES}

MESSAGE_TYPES can be selected from string, twist, laserscan, and pointcloud2.

Subscribe various messages😋

The following 4 message types can be run.

std_msgs/String, geometry_msgs/Twist, sensor_msgs/LaserScan, and sensor_msgs/PointCloud2.

ros2 run simple_listener simple_listener_{MESSAGE_TYPES}

MESSAGE_TYPES can be selected from string, twist, laserscan, and pointcloud2.

Tip

Let's run rqt_graph !

The following is an example of running the simple_talker_twist and simple_listener_twist nodes. You can see that the topic /twist_msg is published and subscribed. simple_nodes

About

This repository is for learning the basics, including ROS2 nodes and topics.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors