unitreerobotics / unitree_ros

BSD 3-Clause "New" or "Revised" License
542 stars 249 forks source link

How to control the robot without sudo? #16

Closed chitianqilin closed 3 years ago

chitianqilin commented 3 years ago

I tried to set up the environment in Ubuntu 20.04. It seems to work well after addressing the path changes and compile errors due to Common::Color. However, the demos are not what I thought to be. Is there any way to control the robot with this package? Can I run real_launch for the purpose? Can real_launch work without sudo privileges?

The following is the output when I tried to run 'roslaunch unitree_legged_real real.launch rname:=a1 ctrl_level:=highlevel firmwork:=3_2' without sudo. I don't know if it is useful.

... logging to /home/Username/.ros/log/ae1ca92a-c2bb-11eb-a73a-4594c786ab26/roslaunch-Username-PC-68983.log Checking log directory for disk usage. This may take a while. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB. started roslaunch server http://Username-PC:39303/ SUMMARY

PARAMETERS

  • /control_level: highlevel
  • /firmwork: 3_2
  • /robot_name: a1
  • /rosdistro: noetic
  • /rosversion: 1.15.11 NODES / node_lcm_server (unitree_legged_real/lcm_server_3_2) ROS_MASTER_URI=http://localhost:11311 process[node_lcm_server-1]: started with pid [69051] Error: Pthread set sched policy failed. [node_lcm_server-1] process has died [pid 69051, exit code 254, cmd /home/Username/unitree/catkin_ws/devel/lib/unitree_legged_real/lcm_server_3_2 a1 highlevel name:=node_lcm_server log:=/home/Username/.ros/log/ae1ca92a-c2bb-11eb-a73a-4594c786ab26/node_lcm_server-1.log]. log file: /home/Username/.ros/log/ae1ca92a-c2bb-11eb-a73a-4594c786ab26/node_lcm_server-1*.log all processes on machine have died, roslaunch will exit shutting down processing monitor... ... shutting down processing monitor complete done
ZKBian commented 3 years ago

Hi, the package unitree_legged_real have to run under sudo, and I introduced a method to run ROS under sudo in the README