robomaster_ros icon indicating copy to clipboard operation
robomaster_ros copied to clipboard

RoboMaster S1 Fails to Connect in STA Mode When Launching ROS2 Driver

Open dharapamplonaa opened this issue 11 months ago • 1 comments

I am experiencing a connection issue when launching the RoboMaster S1 driver in ROS2 Humble using STA mode. The robot successfully connects to the same Wi-Fi network as my computer, and I receive confirmation from both the terminal and the robot. However, when running the launch file, the driver fails to establish a connection, repeatedly displaying errors related to hardware connection failure and missing attributes in robomaster.config. Can anyone help me with this?

System Configuration:

  • Robot: RoboMaster S1
  • Mode: STA Mode
  • OS: ubuntu 22.04
  • ROS2 Version: Humble
  • Network Configuration: Connected via **Wi-Fi (STA mode)

[INFO] [launch]: All log files can be found below /home/dharapc/.ros/log/2025-03-18-15-35-31-481156-dhara-pc-1143876 [INFO] [launch]: Default logging verbosity is set to INFO [INFO] [robomaster_driver-1]: process started with pid [1143877] [INFO] [robot_state_publisher-2]: process started with pid [1143879] [INFO] [joint_state_publisher-3]: process started with pid [1143881] [robot_state_publisher-2] Warning: link 'speaker_link' material 'Material #32.001' undefined. [robot_state_publisher-2] at line 84 in ./urdf_parser/src/model.cpp [robot_state_publisher-2] Warning: link 'speaker_link' material 'Material #32.001' undefined. [robot_state_publisher-2] at line 84 in ./urdf_parser/src/model.cpp [robomaster_driver-1] [INFO] [1742322931.996881919] [robomaster]: Waiting for a robot [robomaster_driver-1] [INFO] [1742322932.324430870] [robomaster]: Found a robot [robomaster_driver-1] [INFO] [1742322932.324629754] [robomaster]: Try to connect via sta to robot with sn None [robomaster_driver-1] 2025-03-18 15:35:32,324 ERROR robot.py:1363 Robot: Connection Failed, Please Check Hardware Connections!!! conn_type sta, host None, target None. [robomaster_driver-1] 2025-03-18 15:35:32,324 ERROR client.py:70 Client: __init__, create Connection, exception: module 'robomaster.config' has no attribute 'DEFAULT_CONN_PROTO' [robomaster_driver-1] 2025-03-18 15:35:32,326 ERROR client.py:153 Client: send_sync_msg, client recv_task is not running. [robomaster_driver-1] 2025-03-18 15:35:32,326 ERROR client.py:153 Client: send_sync_msg, client recv_task is not running. [robomaster_driver-1] 2025-03-18 15:35:32,326 ERROR client.py:153 Client: send_sync_msg, client recv_task is not running. [robomaster_driver-1] 2025-03-18 15:35:32,326 ERROR client.py:153 Client: send_sync_msg, client recv_task is not running. [robomaster_driver-1] 2025-03-18 15:35:32,326 ERROR client.py:153 Client: send_sync_msg, client recv_task is not running. [robomaster_driver-1] [ERROR] [1742322932.326301181] [robomaster]: Could not connect [robomaster_driver-1] [INFO] [1742322932.634194088] [robomaster]: Waiting for a robot [robomaster_driver-1] [INFO] [1742322932.831943307] [robomaster]: Found a robot [robomaster_driver-1] [INFO] [1742322932.832139726] [robomaster]: Try to connect via sta to robot with sn None [robomaster_driver-1] 2025-03-18 15:35:32,832 ERROR robot.py:1363 Robot: Connection Failed, Please Check Hardware Connections!!! conn_type sta, host None, target None. [robomaster_driver-1] 2025-03-18 15:35:32,832 ERROR client.py:70 Client: __init__, create Connection, exception: module 'robomaster.config' has no attribute 'DEFAULT_CONN_PROTO' [robomaster_driver-1] 2025-03-18 15:35:32,832 ERROR client.py:153 Client: send_sync_msg, client recv_task is not running. [robomaster_driver-1] 2025-03-18 15:35:32,832 ERROR client.py:153 Client: send_sync_msg, client recv_task is not running. [robomaster_driver-1] 2025-03-18 15:35:32,832 ERROR client.py:153 Client: send_sync_msg, client recv_task is not running. [robomaster_driver-1] 2025-03-18 15:35:32,832 ERROR client.py:153 Client: send_sync_msg, client recv_task is not running. [robomaster_driver-1] 2025-03-18 15:35:32,832 ERROR client.py:153 Client: send_sync_msg, client recv_task is not running. [robomaster_driver-1] [ERROR] [1742322932.833111406] [robomaster]: Could not connect [robomaster_driver-1] [INFO] [1742322933.140614812] [robomaster]: Waiting for a robot [robomaster_driver-1] [INFO] [1742322933.213870165] [robomaster]: Found a robot [robomaster_driver-1] [INFO] [1742322933.214201100] [robomaster]: Try to connect via sta to robot with sn None [robomaster_driver-1] 2025-03-18 15:35:33,214 ERROR robot.py:1363 Robot: Connection Failed, Please Check Hardware Connections!!! conn_type sta, host None, target None. [robomaster_driver-1] 2025-03-18 15:35:33,214 ERROR client.py:70 Client: __init__, create Connection, exception: module 'robomaster.config' has no attribute 'DEFAULT_CONN_PROTO' [robomaster_driver-1] 2025-03-18 15:35:33,215 ERROR client.py:153 Client: send_sync_msg, client recv_task is not running. [robomaster_driver-1] 2025-03-18 15:35:33,215 ERROR client.py:153 Client: send_sync_msg, client recv_task is not running. [robomaster_driver-1] 2025-03-18 15:35:33,215 ERROR client.py:153 Client: send_sync_msg, client recv_task is not running.

dharapamplonaa avatar Mar 18 '25 20:03 dharapamplonaa

The RoboMaster SDK (which this ROS wraps) does not officially support the RoboMaster S1 but the software on the robot can be modified to support the SDK: look for instructions on the official forum.

If you are using an unmodified S1, the failure you post above is expected. Instead, if you do have modified the S1, try connecting using the Python SDK (like described here) and post the results.

jeguzzi avatar Mar 20 '25 08:03 jeguzzi