[Unitree A1] Installing ROS and qre driver

Hello,

I have a few questions regarding the robot Unitree A1 and its controlling via ROS or the SDK:

Do I install ROS on the Nvidia Computer or the RaspberryPi? What are the recommendations from the manufacturer?

How am I going to install the driver from mybotshopy.de? Do I install ROS then the SDK and then the driver from mybotshop.de?

Also, are there any example codes for using the ROS infrastructure?

Best regards

Martin

Hi Martin,

  • You can install it on the Nvidia or your own host PC. However, if you run it on your PC, please note the latency will effect navigation and other things as it is operating over the network.

  • The qre ROS driver contains the SDK as well. You need only install the qre driver for the A1.

  • You can view the structure via the docs. If you have purchased an A1 from us we can add you to our source repository as well in which you add and suggest changes. Please contact support@mybotshop.de for more info on this.

  • There are a few examples for using the high-level & low-level mode in the docs. More information on this can be seen on the mbs docs 3D Slam and Navigation section.

Regards,
S. O. Sohail

Hi Sohail,

thanks for your answers!

We have the A1 from you and I was already added to the github repo for the A1.

Can you also send me the installation script, please?

Regards,

Martin

Hi Martin,

Currently for the new A1 driver v3.3.1, it can be built directly via ros

catkin build

or

catkin_make

SDK is already available in it. I’ve added a short dependency installer and updated the Readme in the github.

Hello Sohail,

thank you for adding these!

I installed ROS Melodic, put the qre driver files and directores into the catkin workspace and compiled with catkin_make.
Unfortunately I can’t get the command

roslaunch qre_ros high_level_mode.launch

working. I get an Exception:

RLEception: [high_level_mode.launch] is neither a launch file in package [qre_ros] nor is [qre_ros] a launch file name
The traceback for the exception was written to the log file

Can you help me with this?

Please source your directory via, replace the your_username with your PC’s name.

source /home/your_username/catkin_ws/devel/setup.bash

To add it permanently to your PC.

cd
nano .bashrc

Add the same line to the end of your .bashrc file

source /home/your_username/catkin_ws/devel/setup.bash

I have sourced it manually and added it to the .bashrc file, but it is still getting the same error.

Also if I search through my catkin_ws there is no launch file with the name high_level_mode.

Is there anything I missed or is there anything I did not install/compile?

Hi @Martin

I think you are using the driver version 3.3.1. For that actually, we have updated the source code to work with unitree_legged_sdk.

Apologies, as our documentation is still a working progress.

You have to run the following command:

roslaunch qre_a1 base.launch

Please bear in mind that the robot needs to be in sports mode to be working in high-level mode.

Hi Sohail, hi Tahir,

no worries! Thank you for your fast responses!

Can you help me establish a connection to the robot itself?

I am working with a virtual machine and want (at first) to have the driver installed on the VM, regardless the latencies as Sohail described in his first answer.

I am able to connect to the robot over wifi and ssh, but how do I send it ROS commands from my computer?

Regards

Martin

I just reread this thread, which is somewhat the same issue I am working on, I guess.

The reason I am trying to use a remote VM is because we are planning on giving the robot to some of our student and therefore we do not want to install everything on the Nvidia or Pi. We want to give our students the possibilty of an isolated system on their own computer and to avoid having the on-board pcs full of unneccesary files/programs.

For our case, we have the Nvidia and the remote pc. The rosmaster will presumably run on the nvidia and therefore it will be neccessary to setup the ROS network and we will be running ROS on multiple machines.

Is this type of communication possible for the A1 here?

Does the A1 need a ROS master for communication? Because I did not factor in the LCM protocol.
If so, where would be the best option to start the master (nvidiva or remote pc)?

I would really appreciate if you could share your experience!

Best regards

Martin

Hi,

The ROS driver communicates with the A1 through the LCM. So even if there are no ROS or ROS packages on the A1. You can control it fully by running ROS on your system (no need for a multi-machine system) as the ROS commands are translated into LCM commands that are forwarded to the A1.

Our recommendation is that the students build and set up their own PCs with the A1 ROS package, connect to the A1 via WiFi or LAN and then through their own PC’s native ROS environment control the robot. The instructions should be in the quadruped docs. If you have any trouble you can continue to ask questions in the forum.

Regards,

S. O. Sohail

Hi,

thanks for the clarification.

Nevertheless, I followed everything exactly as stated in the quadruped docs.
Using Ubuntu 18.04 with ros-melodic, installing LCM and Unitree_legged_sdk_3.2, running the qre_a1.bash file but it still does not work.
If I run with ‘sudo su’, ROS can’t be sourced nor found. If I run without it, I get the error

[base_node-2] process has died [pid 2090, exit code 254, cmd /home/ros/catkin_ws/devel/lib/a1_base/base_node high_level __name:=base_node __log:=/home/ros/.ros/losc63f6cf2-965-11ed-bb36-080027cded3f/base_node-2.log].
log file: /home/ros/.ros/log/c63f6cf2-965b-11ed-bb36-080027cded3f/base_node-2*.log 

If I install everything with only the SDK without the qre_driver, there is a similar issue that a lcm nodes dies because it needs a real time kernel to work.

Can you help me out here, I tried following your docs and the unitree sdk instructions multiple times but can’t get it to work.

Regards and appreciating your help

Martin

Hi,

After you run sudo su you have to source the environment via source /home/<your_pc_username>/<your_workspace_name>/devel/setup.bash

so for example

sudo su
source /home/nx/qre_ws/devel/setup.bash
roslaunch a1_base base.launch 

The launch file will be according to the package you have as we have different versions.

Hi Sohail,

I tried it exactly the way you described. This is the output:

Any guesses why the node has died?

Regards

Martin

Hi @Martin!

As the error states, the liblcm.so file can’t be opened, since it seems to be missing.
I don’t have access to the code of the a1 qre to dig a little bit deeper bit I’d guess you have to install the lcm package and adjust the path to the shared library.

If lcm is already installed, you can obviously skip the installation and just adjust the path.

This should be everything to install lcm, but I’m not sure about the dependencies:

wget https://github.com/lcm-proj/lcm/releases/download/v1.4.0/lcm-1.4.0.zip
unzip lcm-1.4.0.zip
mv lcm-1.4.0
rm lcm-1.4.0.zip
cd lcm
mkdir build
cd build
cmake ../
make
make install

Thanks for the answers!

I got the node running but I encountered the next problem:

there is no subscriber connecting to the /cmd_vel topic. Therefore I conclude that the robot is not able to connect to the topic.

In the original unitree sdk they set the ip of the external computer to 192.168.123.162, but whenever I set my ip to this address I cannot even ping the robot anymore.

How would it be possible to have the robot subscribe to the topic/to the external computer?

Regards
Martin

Hi, Martin. I have a question about your robot. Is there an Nvidia Jetson Xavier in your robot? If there is, then I have a few questions for you. Can you please send iso/image of your jetson and a photo with the location of the parts inside the robot. I’m wondering exactly where the video card is in it.

Guys, if you have Unitree A1. Then I’m interested in whether there is an Nvidia Jetson Xavier in your robot? If so, I have a few questions for you. Can you please send iso/image of your jetson and a photo with the location of the parts inside the robot? I’m wondering exactly where the graphics card is in it.

@Martin could you do a rosnode info /base_node ?
That should show a list of the topics the node subscribes and publishes on.

About your second question: To connect another computer, you have to have ROS installed and have it on the same network. Then you set the ROS_MASTER_URI of the connecting computer as the IP address of the computer running the roscore. After that, you should be able to send ROS messages between the two.

Hey @MrBasten !
I think it would be best to open your question as a separate topic to not mix up the discussions :slight_smile:

Edit:
NVM, you already did here as I see