turtlebot3_node

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 main TurtleBot3 hardware interface node that communicates with the OpenCR board via USB serial connection. This node handles motor control, sensor data acquisition, and publishes various sensor states including IMU, battery, and joint information.

Publishers

Subscribers

Services

Parameters

  • opencr.id (int, default: 200)

    • Dynamixel ID of the OpenCR board

  • opencr.baud_rate (int, default: 1000000)

    • Baud rate for serial communication with OpenCR

  • opencr.protocol_version (float, default: 2.0)

    • Dynamixel protocol version

  • motors.profile_acceleration_constant (float, default: 214.577)

    • Conversion constant for motor acceleration profile

  • motors.profile_acceleration (float, default: 0.0)

    • Motor acceleration profile in rev/min²

  • wheels.separation (float, default: 0.160)

    • Distance between the left and right wheels in meters

  • wheels.radius (float, default: 0.033)

    • Radius of the wheels in meters

  • sensors.bumper_1 (uint8, default: 0)

    • Enable/disable bumper sensor 1

  • sensors.bumper_2 (uint8, default: 0)

    • Enable/disable bumper sensor 2

  • sensors.illumination (uint8, default: 0)

    • Enable/disable illumination sensor

  • sensors.ir (uint8, default: 0)

    • Enable/disable IR sensor

  • sensors.sonar (uint8, default: 0)

    • Enable/disable sonar sensor

Example Usage

Launch the TurtleBot3 node with default USB port:

ros2 run turtlebot3_node turtlebot3_node

Launch with a custom USB port:

ros2 run turtlebot3_node turtlebot3_node -i /dev/ttyUSB0

Enable motor power using service:

ros2 service call /motor_power std_srvs/srv/SetBool "{data: true}"

Send velocity commands:

ros2 topic pub /cmd_vel geometry_msgs/msg/Twist "{linear: {x: 0.1}, angular: {z: 0.5}}"