robomaster_ros

package robomaster_ros

Executables

executable connect [-h] [--app_id APP_ID] ssid password

The program shows a QR code that encodes SSID and password: point the robot’s camera towards the QR code and press the small button near the intelligent controller slider. The robot will read the code and try to connect to the network. The program wait until the robot connects and then terminates.

Positional arguments:
  • ssid – The network SSID

  • password – The network password

Optional arguments:

app_id – The app id of at most 7 letters

executable discover [-h] [--timeout TIMEOUT] [--modules]

The command lists the available robots with their serial number, IP address, firmware version, and battery level. Discovered robots will beep and blink their LEDs.

Optional arguments:
  • timeout – How much to wait for robots

  • modules – Probe the robot modules

executable robomaster_driver

Execute a Robomaster ROS driver instantiating RoboMasterROS. When the robot disconnects, it waits until the robots connects again when reconnect is enabled (destroying and creating another node each time). It tries to shut down the node as graceful as possible, stopping any ongoing action before notifying modules to stop.

To limite the ROS driver to just module <module>, run

ros2 run robomaster_ros robomaster_driver --ros-args --param <module>.enabled:=true

Important

Execute one driver for each robot you want to control using different namespaces.

executable h264_decoder

TODO

executable display_battery

TODO

executable play_audio

TODO

Launch files

launch file main.launch
Arguments:
  • name – A name used as ROS namespace [Default: ""]

  • model – The type of robot: ep or s1 [Default: ""]

  • with_model_description – Enables publishing the robot model [Default: true]

  • log_level – ROS logging level [Default: info]

  • serial_number – The serial number of the robot. Leave empty to ignore it. [Default: ""]

  • conn_type – The type of connection: sta, ap, or rndis [Default: sta]

  • lib_log_level – Robomaster SDK logging level [Default: ERROR]

  • reconnect – Wait for reconnections [Default: true]

  • arm – Enable the arm module. Should not be enabled together with the servo module [Default: '<model>' == 'ep']

  • left_motor_zero – The arm left servo zero value [Default: 1024]

  • right_motor_zero – The arm right servo zero value [Default: 1024]

  • left_motor_angle – The arm left servo zero angle [Default: 0.073304]

  • right_motor_angle – The arm right servo zero angle [Default: -0.274016]

  • left_motor_direction – The arm left servo direction [Default: 1]

  • right_motor_direction – The arm right servo direction [Default: -1]

  • left_motor_index – The arm left servo index [Default: 0]

  • right_motor_index – The arm right servo index [Default: 1]

  • arm_rate – The update rate for the arm state [Default: 10]

  • armor – Enable the armor module [Default: false]

  • armor_sensitivity – Armor sensitivity [Default: 0.5]

  • battery – Enable the battery module [Default: true]

  • led – Enable the LED module [Default: true]

  • speaker – Enable the speaker module [Default: true]

  • blaster – Enable the blaster module [Default: '<model>' == 's1']

  • gripper – Enable the gripper module [Default: '<model>' == 'ep']

  • open_gripper – Whenever to open gripper at initialization [Default: false]

  • sbus – Enable the sbus module [Default: false]

  • servo – Enable the servo module. Should not be enabled together with the arm module [Default: false]

  • tof_0 – Enable ToF sensor #0 [Default: False]

  • tof_1 – Enable ToF sensor #1 [Default: False]

  • tof_2 – Enable ToF sensor #2 [Default: False]

  • tof_3 – Enable ToF sensor #3 [Default: False]

  • tof_rate – Update rate for ToF sensors [Default: 10]

  • vision_targets – Enable one or more vision detection [Default: []]

  • sensor_adapter – Enable the sensor adapter module [Default: false]

  • sensor_adapter_rate – Update rate for sensor adapters [Default: 10]

  • uart_baudrate – UART baudrate [Default: 115200]

  • uart_data_bit – UART data bit [Default: 0]

  • uart_odd_even – UART parity [Default: 0]

  • uart_stop_bit – UART stop bit [Default: 0]

  • uart_rx_enable – Enable UART RX [Default: false]

  • uart_tx_enable – Enable UART TX [Default: false]

  • uart_rx_size – UART RX buffer size [Default: 50]

  • uart_tx_size – UART TX buffer size [Default: 50]

  • pwm_frequencies – PWM dfrequencies. Enable the PWM module when at least one is positive. [Default: [-1,-1,-1,-1,-1,-1]]

  • chassis – Enables chassis module, see chassis.enabled [Default: true]

  • chassis_rate – Chassis update rate: one of 0, 1, 5, 10, 20, 50. See chassis.rate [Default: 10]

  • chassis_status_rate – Chassis status update rate: one of 0, 1, 5, 10, 20, 50. See chassis.rate [Default: 1]

  • chassis_timeout – Chassis control timeout in seconds. See chassis.timeout [Default: 0.0]

  • chassis_twist_to_wheel_speeds – Enables cmd_vel translation to wheel speeds. See chassis.twist_to_wheel_speeds [Default: false]

  • chassis_force_level – Force the state estimation to stay horizontal. See chassis.force_level [Default: false]

  • chassis_odom_twist_in_odom – Select odom frame for odom twist component. See chassis.odom_twist_in_odom [Default: false]

  • chassis_imu_includes_orientation – Include orientation in imu. See chassis.imu_includes_orientation [Default: true]

  • chassis_error_linear_velocity – State estimation error – linear velocity. See chassis.error.linear_velocity.xy [Default: 0.005]

  • chassis_error_angular_velocity_xy – State estimation error – non horizontal angular velocity. See chassis.error.angular_velocity.xy [Default: 0.01]

  • chassis_error_angular_velocity_z – State estimation error – horizontal angular velocity. See chassis.error.angular_velocity.z [Default: 0.03]

  • chassis_error_linear_acceleration – State estimation error – linear acceleration. See chassis.error.linear_acceleration.xyz [Default: 0.1]

  • gimbal – Enables gimbal module [Default: '<model>' == 's1']

  • gimbal_rate – Update rate for gimbal state [Default: 10]

  • gimbal_mode – Gimbal-chassis coontrol coupling [Default: 2]

  • camera – Enables camera module [Default: true]

  • camera_yaw – The camera orientation with respect to the arm [Default: 0.0]

  • video – The default mode for video topics: OFF=0, ON=1, ON_DEMAND=2, DISABLED=-1 [Default: 2]

  • video_resolution – Video resolution: 360, 540 or 720 pixels height [Default: 360]

  • video_rate – The camera maximal fps. A negative rate means no throttling. [Default: -1.0]

  • video_raw – Enables publishing decoded video stream: OFF=0, ON=1, ON_DEMAND=2, DISABLED=-1 [Default: <video>]

  • video_h264 – Enables publishing original H264 encoded video stream: OFF=0, ON=1, ON_DEMAND=2, DISABLED=-1 [Default: <video>]

  • video_ffmpeg – Enables publishing the original H264 encoded video stream as a image transport [ffmpeg] topic: OFF=0, ON=1, ON_DEMAND=2, DISABLED=-1 [Default: <video>]

  • audio – The default mode for audio topics: OFF=0, ON=1, ON_DEMAND=2, DISABLED=-1 [Default: 0]

  • audio_raw – Enables publishing decoded audio stream: OFF=0, ON=1, ON_DEMAND=2, DISABLED=-1 [Default: <audio>]

  • audio_opus – Enables publishing original OPUS encoded audio stream: OFF=0, ON=1, ON_DEMAND=2, DISABLED=-1 [Default: <audio>]

  • audio_level – Enables publishing sound level: OFF=0, ON=1, ON_DEMAND=2, DISABLED=-1 [Default: <audio>]

  • camera_calibration_suffix – The suffix to append to the camera calibration file [Default: ""]

  • camera_calibration_directory – The location of the camera calibration files [Default: pkg_share(robomaster_ros)/config]

  • camera_calibration_file – The camera calibration file [Default: <camera_calibration_directory>/rm_camera_calibration_<video_resolution><camera_calibration_suffix>.yaml]

  • joint_state_gui – If true, select the GUI version of join_state_publisher [Default: false]

  • joint_state_rate – The rate to publish joint_states [Default: 10.0]

  • tof_0_parent – Parent frame of ToF sensor #0 [Default: base_link]

  • tof_0_xyz – Position of ToF sensor #0 [Default: 0 0 0]

  • tof_0_rpy – Orientation of ToF sensor #0 [Default: 0 0 0]

  • tof_1_parent – Parent frame of ToF sensor #1 [Default: base_link]

  • tof_1_xyz – Position of ToF sensor #1 [Default: 0 0 0]

  • tof_1_rpy – Orientation of ToF sensor #1 [Default: 0 0 0]

  • tof_2_parent – Parent frame of ToF sensor #2 [Default: base_link]

  • tof_2_xyz – Position of ToF sensor #2 [Default: 0 0 0]

  • tof_2_rpy – Orientation of ToF sensor #2 [Default: 0 0 0]

  • tof_3_parent – Parent frame of ToF sensor #3 [Default: base_link]

  • tof_3_xyz – Position of ToF sensor #3 [Default: 0 0 0]

  • tof_3_rpy – Orientation of ToF sensor #3 [Default: 0 0 0]