# diff_drive_controller *This file is ai generated. Do not edit this file directly. Instead, edit the node source code and run the generate-node-docs command to update this file.* ## Description The differential drive controller node that calculates odometry information for the TurtleBot3. This node subscribes to joint states and IMU data, computes the robot's position and orientation, and publishes odometry messages and TF transforms. ## Publishers - `odom` ([nav_msgs/Odometry](http://docs.ros.org/api/nav_msgs/html/msg/Odometry.html)) - Odometry information including pose and twist in the odometry frame - `/tf` ([tf2_msgs/TFMessage](http://docs.ros.org/api/tf2_msgs/html/msg/TFMessage.html)) - Transform from odometry frame to base_footprint frame (if `odometry.publish_tf` is enabled) ## Subscribers - `joint_states` ([sensor_msgs/JointState](http://docs.ros.org/api/sensor_msgs/html/msg/JointState.html)) - Joint position and velocity information from the wheels - `imu` ([sensor_msgs/Imu](http://docs.ros.org/api/sensor_msgs/html/msg/Imu.html)) - IMU orientation data (if `odometry.use_imu` is enabled) ## Services - `reset_odometry` ([std_srvs/Trigger](http://docs.ros.org/api/std_srvs/html/srv/Trigger.html)) - Reset the odometry to zero position and orientation ## Parameters - `odometry.frame_id` (string, default: "odom") - Frame ID for the odometry parent frame - `odometry.child_frame_id` (string, default: "base_footprint") - Frame ID for the odometry child frame - `odometry.use_imu` (bool, default: false) - Use IMU data for orientation in odometry calculations - `odometry.publish_tf` (bool, default: false) - Publish TF transform from odometry frame to base_footprint ## Example Usage The diff_drive_controller node is typically launched alongside the turtlebot3_node and does not need to be started separately. However, you can reset the odometry using: ```bash ros2 service call /reset_odometry std_srvs/srv/Trigger ``` View the odometry data: ```bash ros2 topic echo /odom ``` View the transform tree: ```bash ros2 run tf2_tools view_frames ```