Loading the lesson...
In the print dialog, choose "Save as PDF" as the destination.
ROS 2 Practical - Lab 05
Camera, LiDAR, and odometry monitoring
sudo apt-get install gz-harmonic
sudo apt install ros-jazzy-cartographer ros-jazzy-cartographer-ros
sudo apt install ros-jazzy-navigation2 ros-jazzy-nav2-bringup
sudo apt install ros-jazzy-rviz2 ros-jazzy-rqt*
cd ros_ws/src
git clone -b jazzy https://github.com/ROBOTIS-GIT/DynamixelSDK.git
git clone -b jazzy https://github.com/ROBOTIS-GIT/turtlebot3_msgs.git
git clone -b jazzy https://github.com/ROBOTIS-GIT/turtlebot3.git
git clone -b jazzy https://github.com/ROBOTIS-GIT/turtlebot3_simulations.git
colcon build --symlink-installexport TURTLEBOT3_MODEL=waffle_pi and a shared ROS_DOMAIN_ID (30) in ~/.bashrcnav_msgs/msg/Odometrygeometry_msgs/PoseWithCovariance pose
geometry_msgs/Pose pose
Point position # x, y, z
Quaternion orientation # rotation
float64[36] covariance
geometry_msgs/TwistWithCovariance twist
Twist twist
Vector3 linear
Vector3 angular
float64[36] covarianceOdometry message.turtlebot3_lab05 package bundles monitoring toolsexport TURTLEBOT3_MODEL=waffle_pi
export ROS_DOMAIN_ID=30
ros2 launch turtlebot3_lab05 lab05_complete.launch.pyros2 run turtlebot3_teleop teleop_keyboard# Manual publish alternative
ros2 topic pub --rate 10 /cmd_vel geometry_msgs/msg/TwistStamped \
'{header: {frame_id: ""},
twist: {linear: {x: 0.2, y: 0.0, z: 0.0}, angular: {x: 0.0, y: 0.0, z: 0.1}}}'| Display | Topic / Style | Notes |
|---|---|---|
| Robot Model | Robot description | 3D TurtleBot3 model |
| LaserScan | /scan | Points/spheres, about 0.1m |
| Image | /camera/image_raw | Use compressed transport for performance |
| Odometry | /odom | Arrow plus trail of the last ~100 poses |
| TF | - | Visualize base_link, odom, map frames |
File > Save Config Asros2 topic list
ros2 topic info /scan
ros2 topic hz /scan
ros2 topic hz /odom
ros2 interface show sensor_msgs/msg/LaserScan
ros2 interface show nav_msgs/msg/Odometrymap
global reference
odom
drifts over time
base_footprint
base_link
robot body
camera_link
sensor frame
base_scan
sensor frame
map = global reference, odom = drifts over time, base_link = robot bodybase_linkros2 run tf2_tools view_frames
ros2 run tf2_ros tf2_echo map base_linkturtlebot3_simulationsrobot_state_publisher is running and URDF is published/cmd_vel has both a publisher and subscriberros2 topic echo /cmd_vel --once
ros2 topic info /cmd_vel/cmd_vel actually has a publisher and a subscriber./cmd_vel, unlike the plain Twist used in earlier labsmap to odom to base_link to sensors) defines how every sensor reading is spatially relatedros2 topic hz, ros2 topic info, and tf2_echo are the go-to commands for diagnosing "nothing is happening"Mahmoud Abas|Lab 05: TurtleBot3 Simulation with RViz - Camera, LiDAR & Odometry