Controlling robot via VM

Dear Support, @Sohail

Our goals is to send commands (either with ROS or unitree_legged_sdk) to the robot Unitree A1 via SSH from a VM.

We have experienced some difficulties and would appreciate your help on this matter. Could you give us a detailed instruction on how to successfully control the robot via PC? And which board do we connect to?

I tried everything on docs.quadruped.de and also had a look on forums but couldn’t solve the issue. I’m also not sure if we ever received the a1_installation script (in case this is necessary).

Additionally, what would be the best way to access the video stream and use it via python?

Here is what we have done so far:

  1. Retrieved IP address from Raspberry Pi and Nvidia board

a. Pi (rear end of the robot): 192.168.123.161
b. Nvidia: (front): 192.168.123.209

  1. Connected to WIFI
  2. SSH’d into Pi

a Can’t control robot, cmake doesn’t build the unitree_legged_sdk correctly. There is also no catkin_ws folder nor ROS installed

  1. SSH’d into Nvidia board
    a. This one has catkin_ws and ROS is installed on it.

b.However high_level_mode.launch is not recognized. It says it’s not a launch file in qre_ros. I’m stuck here.

c.I tried executing the example files in unitree_legged_sdk but the following error occurs: Error: Bind client ip&port failed

Thank you and best regards

Tenzin

This is the error I get when I execute roslaunch qre_ros high_level_mode.launch

Dear @nvmten,

One quick question can you access the A1 via its hotpsot? It has the WiFi SSID if UnitreeRoboticsA1-*** and the password is eight times 0 or 00000000.

If so you can connect via WiFi and the Vision IP is 192.168.12.1:8080, you can view other ports via the app. For the control I need to know the A1 you have, and the sensors it has, because we have different firmware for different A1’s.

Thanks for the quick response. Here is the datasheet:


Model Nr: LK01-QR01
Let me know if you need more information.

Regarding the Wifi: yes I can access it. How do I access the Vision IP? I entered it in the browser but it failed to load.

When I enter this IP, it works: 192.168.123.207:8080 and the MJPG Streamer website pops up.

Thanks

Can you please send this information from the Nvidia?

cat /etc/network/interfaces

You can also view the camera by changing it to stream in your same port.

Get the latest A1 software package. The old catkin_ws can be deleted in the Nvidia PC of the A1, then you can copy over the new A1 software package over to Nvidia via

scp -r A1_3.2.0 unitree@192.168.123.207://home/unitree

After that, you would need to activate the internet, the instructions are in the README.md. Next step is to run the script, you may have to give it super user via

sudo chmod +x a1_installation_script_3.2.0.bash

To run

./a1_installation_script_3.2.0.bash

Just follow the instructions! Hopefully, it should install everything smoothly. Wishing you a good day.

Regards,
S. O. Sohail

I’m sorry the IP for Nvidia is 192.168.123.209, not 192.168.123.207.
This is the cat output from the Nvidia:

#auto lo
#iface lo inet loopback

#auto eth0
#iface eth0 inet static
#address 192.168.123.12
#netmask 255.255.255.0
#broadcast 192.168.123.255

#auto eth0:0
#iface eth0:0 inet static
#name Ethernet alias LAN card
#address 192.168.11.110
#netmask 255.255.255.0
#broadcast 192.168.11.255
#network 192.168.11.1

Thank you very much. I just requested the software package from support@mybotshop.de

I will give an update once I’ve installed and tested it :slight_smile:

Best regards
Tenzin

@Sohail, they are having a A1 Explorer with NVIDIA NX - But a very early one from Nov. 2021.

please
sudo nano /etc/network/interfaces
an un-comment all the items after you have completed the installation of the A1. The IP should return to 192.168.123.12 after you restart the robot or the network manager

sudo service NetworkManager restart

I was able to corrrectly install the software package (with internet). How should I proceed now regarding controlling the robot?
I tried:
sudo su
source ~/catkin_ws/devel/setup.bash
roslaunch qre_ros high_level_mode.launch

However, it said that lcm_server is unable to launch.

Thank you and best regards

Tenzin

Have you reverted the internet access by un-commenting the interfaces? Also, were there any errors during the installation of the packages in the Nvidia nx?

Yes, I uncommented the interface and now the IP changed back to 192.168.123.12 as intended. There was an error in the beginning when I didn’t have internet connection, but I deleted the catkin_ws folder and ran it again with internet access. It completed without errors.

When you re-ran with the internet connection, I’m expecting that you ran the install script and not catkin_make/ catkin build. If it has been successfully built, it means that the error is from it unable being to connect to the A1. If you have reset and un-commented.

Perhaps try restarting the A1 and running again:

sudo su
source ~/catkin_ws/devel/setup.bash
roslaunch qre_ros high_level_mode.launch

Also please share the ifconfig of the nvidia nx as well as the content in the final lines lf /home/unitree/.bashrc

I followed with tthe sudo su and source commands however the same error pops up.
I also noticed that the following line appears during startup:

-bash: //devel/setup.bash: No such file or directory

here is the ifconfig:

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.123.12 netmask 255.255.255.0 broadcast 192.168.123.255
inet6 fd7a:2ebc:cc18:0:4ab0:2dff:fe50:c7a3 prefixlen 64 scopeid 0x0
inet6 fe80::4ab0:2dff:fe50:c7a3 prefixlen 64 scopeid 0x20
ether 48:b0:2d:50:c7:a3 txqueuelen 1000 (Ethernet)
RX packets 1819 bytes 685439 (685.4 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 612 bytes 81641 (81.6 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 37

eth0:0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.11.110 netmask 255.255.255.0 broadcast 192.168.11.255
ether 48:b0:2d:50:c7:a3 txqueuelen 1000 (Ethernet)
device interrupt 37

lo: flags=4169<UP,LOOPBACK,RUNNING,MULTICAST> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10
loop txqueuelen 1 (Local Loopback)
RX packets 606 bytes 441172 (441.1 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 606 bytes 441172 (441.1 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

rndis0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether ee:26:14:1e:f3:e1 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

usb0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether ee:26:14:1e:f3:e3 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

bashrc:

export PATH=/usr/local/cuda-10.2/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-10.2/lib64:$LD_LIBRARY_PATH
export GST_PLUGIN_PATH=/home/unitree/Unitree/autostart/04imageai/mLComSystemFrame/ThirdParty/webSinkPipe/build
source /opt/ros/melodic/setup.bash
source ~/catkin_ws/devel/setup.bash
export QRE_PATH=/home/unitree/catkin_ws
source /home/unitree/catkin_ws/utils/qre_unitree_envs.bash
export QRE_PATH=/
source //utils/qre_unitree_envs.bash
export QRE_PATH=/home/unitree/catkin_ws
source /home/unitree/catkin_ws/utils/qre_unitree_envs.bash
export QRE_PATH=/home/unitree/catkin_ws
source /home/unitree/catkin_ws/utils/qre_unitree_envs.bash
export QRE_PATH=/home/unitree/catkin_ws
source /home/unitree/catkin_ws/utils/qre_unitree_envs.bash
export QRE_PATH=/home/unitree/catkin_ws
source /home/unitree/catkin_ws/utils/qre_unitree_envs.bash
export QRE_PATH=/home/unitree/catkin_ws
source /home/unitree/catkin_ws/utils/qre_unitree_envs.bash
export QRE_PATH=/home/unitree/catkin_ws
source /home/unitree/catkin_ws/utils/qre_unitree_envs.bash
export QRE_PATH=/home/unitree/catkin_ws
source /home/unitree/catkin_ws/utils/qre_unitree_envs.bash
export QRE_PATH=/home/unitree/catkin_ws
source /home/unitree/catkin_ws/utils/qre_unitree_envs.bash

You can replace the following in the .bashrc after the source /opt/ros/melodic/setup.bash

source /opt/ros/melodic/setup.bash
source /home/unitree/catkin_ws/devel/setup.bash
export QRE_PATH=/home/unitree/catkin_ws
source /home/unitree/catkin_ws/utils/qre_unitree_envs.bash

Are you able to ping the other PC in the A1. This issue seems quite strange. Is anything else connected to the A1 via the Ethernet ports, if so please try removing it and reconnecting.

Also please do the following, if it still doesnt work.

cd
source.bashrc
cd catkin_ws
sudo rm -r /devel /build
catkin_make
source devel/setup.bash

If it still doesn’t work, try running the Unitree SDK directly without ROS. If the installation of the LCM by the install script was successful then if you go to the catkin_ws/utils/unitree_legged_sdk-3.2.0/examples folder. In there try running

sudo ./example_walk.cpp

The robot should start walking so be careful.

If this does not work, it means the installation of the LCM failed. For that, you must delete the catkin_ws, re-run the install script and carefully watch and make sure that when the build of the LCM reaches 100%. If it does not reach 100% then it means either a package is missing or the architecture/environment variables have not been set correctly.

If the issue persists, we can schedule a meeting!

One more thing that you can try is to install the provided package in your own PC/Laptop with ubuntu 18.04 (be sure to change the parameters as mentioned in the quadruped docs i.e. arm64 to amd64 both in unitree CMAKE and in the qre_unitree_envs.bash) and connecting it via Ethernet cable or Hotspot to the robot and running the same commands i.e.:

sudo su
source ~/catkin_ws/devel/setup.bash
roslaunch qre_ros high_level_mode.launch

Dear Sohail,

Thank you so much, now it launches without any errors. What would be the command to let the dog walk?

the sudo ./example_walk.cpp command does not work however.

Best regards

I also noticed that the IP of nvidia and pi of my robot is reversed compared to in docs.quadruped.de.
To access the nvidia board i have to use 192.168.123.12
and for pi: 192.168.123.161

image