The go1controller
package can be used to control the robot via ROS.
It currently supports testing the connection by cycling between standing and laying down with the testHigh.py
script and controlling the robot with a gamepad.
To run the testHigh.py
script open a terminal and run:
roslaunch unitree_legged_real real.launch ctrl_level:=HIGHLEVEL
This starts the translation layer between ROS messages and the UDP protocol.
Then start up a second terminal and run:
rosrun go1controller testHigh.py
The robot should now change its position every ten seconds.
To run the joystick_control
program you can either start the translation layer by unitree as shown above
and then run rosrun go1controller joystick_control [gamepad layout number]
or run the provided launch file, which also starts the translation layer:
roslaunch go1coltroller joystick_control.launch [gamepad layout number]
Then in another terminal start the joystick input:
rosrun joy joy_node
Make sure a gamepad is connected to the computer. You maybe also have to change the selected device.
If the robot doesn't move, make sure you are connected via ethernet or Wi-Fi.
Make sure, you can ping 192.168.123.161
.
To change the joystick input device follow this link