Not able to connect to the mobile base

Hello :slight_smile:

Having issue with connecting to the mobile base when with_mobile_base=True that does not happen when with_mobile_base=False. I have tried restarting the server without any luck within the dashboard.

        debug_error_string = "UNKNOWN:Error received from peer  {grpc_message:"failed to connect to all addresses; last error: UNKNOWN: ipv4:10.42.0.24:50051: Failed to connect to remote host: Connection refused", grpc_status:14, created_time:"2024-09-11T14:28:38.586720115+02:00"}"
>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/peter/miniconda3/envs/lebai/lib/python3.10/site-packages/reachy_sdk/reachy_sdk.py", line 80, in __init__
    raise IOError('Failed to connect to mobile base!')

What can I do to fix this issue?

FYI, this is the mobile base server logs:

â—Ź reachy_mobile_base.service - Mobile base SDK server service
     Loaded: loaded (/home/reachy/.config/systemd/user/reachy_mobile_base.service; enabled; vendor preset: enabled)
     Active: active (running) since Wed 2024-09-11 14:25:28 CEST; 12min ago
    Process: 9269 ExecStartPre=/bin/sleep 10 (code=exited, status=0/SUCCESS)
   Main PID: 9647 (bash)
      Tasks: 66 (limit: 9063)
     Memory: 95.0M
        CPU: 4min 53.967s
     CGroup: /user.slice/user-1000.slice/user@1000.service/app.slice/reachy_mobile_base.service
             ├─9647 /usr/bin/bash /home/reachy/reachy_ws/src/reachy_2023/mobile_base_controller/mobile_base_sdk_server/launch_mobile_base.bash
             ├─9727 /usr/bin/python3 /opt/ros/humble/bin/ros2 launch mobile_base_sdk_server run_mobile_base_sdk_server_and_hal.launch.py
             ├─9740 /home/reachy/reachy_ws/install/rplidar_ros2/lib/rplidar_ros2/rplidar_scan_publisher --ros-args -r __node:=rplidar_scan_publisher --params-file /tmp/launch_params_6ja04712
             ├─9743 /usr/bin/python3 /home/reachy/reachy_ws/install/zuuu_hal/lib/zuuu_hal/hal --ros-args -r __node:=zuuu_hal --params-file /home/reachy/reachy_ws/install/zuuu_hal/share/zuuu_hal/config/params.yaml
             └─9745 /usr/bin/python3 /home/reachy/reachy_ws/install/mobile_base_sdk_server/lib/mobile_base_sdk_server/mobile_base_sdk_server --ros-args

Sep 11 14:25:18 reachy-2023-R0020 systemd[1024]: Starting Mobile base SDK server service...
Sep 11 14:25:28 reachy-2023-R0020 systemd[1024]: Started Mobile base SDK server service.
Sep 11 14:25:29 reachy-2023-R0020 reachy_mobile_base[9647]: Starting mobile base launch file.
Sep 11 14:25:29 reachy-2023-R0020 reachy_mobile_base[9727]: [INFO] [launch]: All log files can be found below /home/reachy/.ros/log/2024-09-11-14-25-29-241619-reachy-2023-R0020-9727
Sep 11 14:25:29 reachy-2023-R0020 reachy_mobile_base[9727]: [INFO] [launch]: Default logging verbosity is set to INFO
Sep 11 14:25:29 reachy-2023-R0020 reachy_mobile_base[9727]: [INFO] [rplidar_scan_publisher-1]: process started with pid [9740]
Sep 11 14:25:29 reachy-2023-R0020 reachy_mobile_base[9727]: [INFO] [hal-2]: process started with pid [9743]
Sep 11 14:25:29 reachy-2023-R0020 reachy_mobile_base[9727]: [INFO] [mobile_base_sdk_server-3]: process started with pid [9745]
Sep 11 14:25:29 reachy-2023-R0020 reachy_mobile_base[9727]: [rplidar_scan_publisher-1] [INFO] [1726057529.416449347] [rplidar_scan_publisher]: RPLIDAR running on ROS2 package rplidar_ros2.ROS2 SDK Version:1.0.1, RPLIDAR SDK Version:2.0.0
Sep 11 14:25:29 reachy-2023-R0020 reachy_mobile_base[9727]: [rplidar_scan_publisher-1] [INFO] [1726057529.462760500] [rplidar_scan_publisher]: RPLIDAR S/N: A993EC95C1EA9ED1B2E49CF42A4F4571
Sep 11 14:25:29 reachy-2023-R0020 reachy_mobile_base[9727]: [rplidar_scan_publisher-1] [INFO] [1726057529.462830369] [rplidar_scan_publisher]: Firmware Ver: 1.01
Sep 11 14:25:29 reachy-2023-R0020 reachy_mobile_base[9727]: [rplidar_scan_publisher-1] [INFO] [1726057529.462844456] [rplidar_scan_publisher]: Hardware Rev: 18
Sep 11 14:25:29 reachy-2023-R0020 reachy_mobile_base[9727]: [rplidar_scan_publisher-1] [INFO] [1726057529.513993886] [rplidar_scan_publisher]: RPLidar health status : 0
Sep 11 14:25:29 reachy-2023-R0020 reachy_mobile_base[9727]: [rplidar_scan_publisher-1] [INFO] [1726057529.514110609] [rplidar_scan_publisher]: RPLidar health status : OK.
Sep 11 14:25:29 reachy-2023-R0020 reachy_mobile_base[9727]: [rplidar_scan_publisher-1] [INFO] [1726057529.709516290] [rplidar_scan_publisher]: current scan mode: DenseBoost, sample rate: 32 Khz, max_distance: 30.0 m, scan frequency:20.0 Hz,
Sep 11 14:25:29 reachy-2023-R0020 reachy_mobile_base[9727]: [hal-2] [INFO] [1726057529.963421557] [zuuu_hal]: Starting zuuu_hal!
Sep 11 14:25:29 reachy-2023-R0020 reachy_mobile_base[9727]: [hal-2] [INFO] [1726057529.966292420] [zuuu_hal]: zuuu version: 1.2
Sep 11 14:25:29 reachy-2023-R0020 reachy_mobile_base[9727]: [hal-2] [INFO] [1726057529.968099583] [zuuu_hal]: Reading Zuuu's sensors once...
Sep 11 14:25:29 reachy-2023-R0020 reachy_mobile_base[9727]: [hal-2] [INFO] [1726057529.982770210] [zuuu_hal]: The maximum PWM value is 20.0% => maximum wheel speed is set to 4.48rad/s
Sep 11 14:25:30 reachy-2023-R0020 reachy_mobile_base[9727]: [hal-2] [WARN] [1726057530.007892477] [zuuu_hal]: Battery voltage OK (26.0V)
Sep 11 14:25:30 reachy-2023-R0020 reachy_mobile_base[9727]: [hal-2] [WARN] [1726057530.020445973] [zuuu_hal]: waiting for a LIDAR scan to be read. Discarding all commands...
Sep 11 14:25:30 reachy-2023-R0020 reachy_mobile_base[9727]: [mobile_base_sdk_server-3] [INFO] [1726057530.201022042] [mobile_base_server]: Initialized mobile base server.
Sep 11 14:25:30 reachy-2023-R0020 reachy_mobile_base[9727]: [hal-2] [WARN] [1726057530.523920713] [zuuu_hal]: waiting for a LIDAR scan to be read. Discarding all commands...
Sep 11 14:25:31 reachy-2023-R0020 reachy_mobile_base[9727]: [hal-2] [WARN] [1726057531.028041893] [zuuu_hal]: waiting for a LIDAR scan to be read. Discarding all commands...
Sep 11 14:25:31 reachy-2023-R0020 reachy_mobile_base[9727]: [hal-2] [WARN] [1726057531.531464606] [zuuu_hal]: waiting for a LIDAR scan to be read. Discarding all commands...
Sep 11 14:25:32 reachy-2023-R0020 reachy_mobile_base[9727]: [hal-2] [WARN] [1726057532.036825689] [zuuu_hal]: waiting for a LIDAR scan to be read. Discarding all commands...
Sep 11 14:25:32 reachy-2023-R0020 reachy_mobile_base[9727]: [hal-2] [INFO] [1726057532.556608071] [zuuu_hal]: => Zuuu HAL up and running! **
Sep 11 14:26:30 reachy-2023-R0020 reachy_mobile_base[9727]: [hal-2] [WARN] [1726057590.019348794] [zuuu_hal]: Battery voltage OK (25.9V)
Sep 11 14:27:30 reachy-2023-R0020 reachy_mobile_base[9727]: [hal-2] [WARN] [1726057650.025710056] [zuuu_hal]: Battery voltage OK (25.9V)
Sep 11 14:28:30 reachy-2023-R0020 reachy_mobile_base[9727]: [hal-2] [WARN] [1726057710.020759289] [zuuu_hal]: Battery voltage OK (25.9V)
Sep 11 14:29:30 reachy-2023-R0020 reachy_mobile_base[9727]: [hal-2] [WARN] [1726057770.022879827] [zuuu_hal]: Battery voltage OK (25.9V)
Sep 11 14:30:30 reachy-2023-R0020 reachy_mobile_base[9727]: [hal-2] [WARN] [1726057830.035698069] [zuuu_hal]: Battery voltage OK (25.9V)
Sep 11 14:31:30 reachy-2023-R0020 reachy_mobile_base[9727]: [hal-2] [WARN] [1726057890.023787003] [zuuu_hal]: Battery voltage OK (25.9V)
Sep 11 14:32:30 reachy-2023-R0020 reachy_mobile_base[9727]: [hal-2] [WARN] [1726057950.018575350] [zuuu_hal]: Battery voltage OK (25.9V)
Sep 11 14:33:30 reachy-2023-R0020 reachy_mobile_base[9727]: [hal-2] [WARN] [1726058010.053788195] [zuuu_hal]: Battery voltage OK (26.0V)
Sep 11 14:34:30 reachy-2023-R0020 reachy_mobile_base[9727]: [hal-2] [WARN] [1726058070.018017775] [zuuu_hal]: Battery voltage OK (26.0V)
Sep 11 14:35:30 reachy-2023-R0020 reachy_mobile_base[9727]: [hal-2] [WARN] [1726058130.017743407] [zuuu_hal]: Battery voltage OK (25.9V)
Sep 11 14:36:30 reachy-2023-R0020 reachy_mobile_base[9727]: [hal-2] [WARN] [1726058190.024304026] [zuuu_hal]: Battery voltage OK (25.8V)
Sep 11 14:37:30 reachy-2023-R0020 reachy_mobile_base[9727]: [hal-2] [WARN] [1726058250.029626589] [zuuu_hal]: Battery voltage OK (26.0V)

Hello :slight_smile:
Could you please provide the serial number of your mobile base or your Reachy?
(This will allow me to access your robot’s history)

When you mention trying to connect to the mobile base, what exactly did you type, and what was your objective?

Based on the mobile base logs and the line => Zuuu HAL up and running! **, it appears that the base started correctly and was ready to be controlled. Did you try controlling it? If so, how and were you unsuccessful?

And also if you need to restart the services, you can either use the dashboard or manually launch them as described below:

Thank you in advance for any details you can provide to help me assist you better.

I tried this:

from reachy_sdk import ReachySDK
ROBOT_IP = "10.42.0.24"

reachy = ReachySDK(ROBOT_IP, with_mobile_base=True)

I never managed to control the mobile base

The serial number should be MB-0033

It seems the error you are encountering is related to a network connection issue when trying to connect to Reachy at 10.42.0.24. To help us troubleshoot this further, I suggest trying the following steps:

  1. Test the connection locally: Could you try connecting to Reachy locally to verify if the issue is network-related? (using a screen, keyboard and mouse connected to Reachy which is connected to the mobile base)
from reachy_sdk import ReachySDK

reachy_mobile = ReachySDK(host='localhost', with_mobile_base=True)

Here is the link to the notebook where you can run simple tests with the mobile base. Let us know if the connection works when using localhost.

  1. Ping Reachy from the other machine: In parallel, please try to ping Reachy from the machine you’re using to connect to ensure the IP address 10.42.0.24 is correct and that Reachy is reachable over the network. You can run the following command in your terminal:
ping 10.42.0.24

Let us know the results from both tests so we can further assist you in resolving this issue. :slight_smile:

Indeed, if I ssh to reachy I can connect to the mobile base, but not when I use 10.42.0.24, I guess it is linked to the fact that I’m connected with ethernet to the computer.

Pinging is not an issue:

 ~/D/w/d/r/r/graphs ❯❯❯ ping 10.42.0.24                                                                                                                                   (lebai) lebai ✭ ✖ ✱ ◼
PING 10.42.0.24 (10.42.0.24) 56(84) bytes of data.
64 bytes from 10.42.0.24: icmp_seq=1 ttl=64 time=0.233 ms
64 bytes from 10.42.0.24: icmp_seq=2 ttl=64 time=0.154 ms
^C
--- 10.42.0.24 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1013ms
rtt min/avg/max/mdev = 0.154/0.193/0.233/0.039 ms

Connecting without the mobile base is not an issue as well.

Hey,

This is a weird issue as the logs of the mobile base seem normal.

  1. To double check that the hardware and middle-ware of the mobile base are working correctly, could you make it move from Reachy’s computer? Two ways of doing it:
  • Send SDK client commands such as here
  • Or do it in CLI with a ROS command: ros2 run zuuu_hal teleop_keyboard → And follow the instructions that appear on the terminal. Remember to kill this program (CTRL-C) after use, because if you let it run it will spam requests for a velocity of 0.
  1. If I understand correctly, when you run ReachySDK(ROBOT_IP, with_mobile_base=True) from your computer, it doesn’t work, but it does if you run ReachySDK(host='localhost', with_mobile_base=True) from Reachy’s computer, and network seems fine.

    2.1 Can you run ReachySDK(host='10.42.0.24', with_mobile_base=True) from Reachy’s computer and report back pls?
    2.2 Can you check that the version of the Python package reachy_sdk is the same between the robot and your PC? If not, try to change the version on your PC to the one of Reachy’s.

Best,
RĂ©mi

  • so: ros2 run zuuu_hal teleop_keyboard work without issue.

  • ReachySDK(host='10.42.0.24', with_mobile_base=True) from Reachy Computer work without issue as well

  • But ReachySDK(host='10.42.0.24', with_mobile_base=True) from my computer does not work unfortunately, connected via Ethernet. I have the same issue in Reachy HotSpot WIFI at: 10.42.0.1.

It seems to be a network issue.

Both version are reachy_sdk @ 0.7

FYI, I think i’m going to fix it with a custom solution, but I think i already had this issue on another reachy.

Key to reproduce is to connect using ethernet sharing IPs and trying to connect the mobile base.

Indeed, it looks like a network issue, but it’s weird that it only happens when the flag for the mobile base is ON. We’ll look into this and try to reproduce it. If it becomes blocking for you, please ping us again.

Hi @xaviertao,
The connection to the mobile base with ReachySDK actually uses a dedicated sdk for the mobile base. Even though the reachy-sdk version is the same between the lib installed on Reachy and on your computer, you might not have the same lib version for the mobile base control.

Could you check if there is any version difference between your computer and Reachy’s for mobile-base-sdk and mobile-base-sdk-api?

That makes sense.

Could you help me out on how can I print those version? I only did: pip install reachy_sdk

p.s.: I’m using the python sdk only

Ok got it so, when installing reachy-sdk using pip i get:

(lebai) ~/D/w/dora ❯❯❯ pip show mobile-base-sdk                                                                                                         (lebai) fix-distributed-node ✭ ◼
Name: mobile-base-sdk
Version: 1.0.2
Summary: Mobile Base SDK for the Reachy robot.
Home-page: https://github.com/pollen-robotics/mobile-base-sdk
Author: Pollen Robotics
Author-email: contact@pollen-robotics.com
License: 
Location: /home/peter/miniconda3/envs/lebai/lib/python3.10/site-packages
Requires: grpcio, numpy, pillow, protobuf

But on the machine it is:

reachy@reachy-2023-R0020:~$ pip show mobile-base-sdk
Name: mobile-base-sdk
Version: 0.1.1
Summary: Mobile Base SDK for the Reachy robot.
Home-page: https://github.com/pollen-robotics/mobile-base-sdk
Author: Pollen Robotics
Author-email: contact@pollen-robotics.com
License: UNKNOWN
Location: /home/reachy/dev/mobile-base-sdk
Requires: grpcio, numpy, protobuf, pygame, reachy-sdk-api
Required-by: reachy-sdk

Downgrading the version of the mobile-base-sdk using

pip install mobile-base-sdk==0.1.1

On my machine fixed the issue!

I have opened: Fix mobile base sdk issue when using reachy2023 by haixuanTao · Pull Request #60 · pollen-robotics/reachy-sdk · GitHub

feel free to review it extensively

1 Like

Thanks Tao, we’ll look into it!