Rosanswers logo

I am using ROS to control the Unitree A1,

But when I run the roslaunch command, this error keeps showing.

process[node_lcm_server_running-1]: started with pid [919816] Error: Pthread set sched policy failed. process[unitree_base_node-2]: started with pid [919817] [node_lcm_server_running-1] process has died [pid 919816, exit code 254, cmd /home/user/catkin_ws/devel/lib/unitree_base/lcm_server_running_node a1 highlevel __name:=node_lcm_server_running __log:=/home/user/.ros/log/114485b2-0e2f-11ed-9046-4b1a6b229934/node_lcm_server_running-1.log].

I've read the second log file while the first log isn't even made,

Error: Lock memory failed.

I think the error message is related to the first error message which is exit 254: pthread set sched policy failed.

Is there anybody who have experienced this error or the one similar to this?

Thanks in advance!

Originally posted by mirakim on ROS Answers with karma: 21 on 2022-07-28

Post score: 0


1 Answer 1


Rosanswers logo

The pthread_attr_setschedpolicy() call succeeds only if the ros node is run by the root user. You will need to decide if the increased risk is worthwhile.

Originally posted by Mike Scheutzow with karma: 4903 on 2022-07-28

This answer was ACCEPTED on the original site

Post score: 1

Original comments

Comment by mirakim on 2022-07-29:
Thank you for the info! Actually, I cannot get anything related to ROS on root. Do I have to install all things in root environment again or can I run the roslaunch command after 'sudo'?

  • I ran the roslaunch command after 'sudo' and it says sudo: roslaunch: command not found Thanks in advance! :)

Comment by mirakim on 2022-07-29:
I figured out that adding the tag such as launch-prefix='sudo' helps the node to run by the root user. Thank you so much! :)

Comment by mirakim on 2022-08-04:
May I ask another question? I get another error

process[node_lcm_server_running-1]: started with pid [4513]

Error: Lock memory failed. [node_lcm_server_running-1] process has died [pid 4513, exit code 254, cmd sudo /root/catkin_ws/devel/lib/unitree_base/lcm_server_running_node a1 highlevel __name:=node_lcm_server_running __log:=/root/.ros/log/1c904e4a-10fc-11ed-84a2-48b02d15e5cb/node_lcm_server_running-1.log]. log file: /root/.ros/log/1c904e4a-10fc-11ed-84a2-48b02d15e5cb/node_lcm_server_running-1*.log

This error message seems to be another problem, Would you please let me know what is going on?

For additional information, I am running this file in docker, with M1 chip, in root mode.

Thanks in advance :)

Comment by Mike Scheutzow on 2022-08-04:
The app could be trying to create a shared memory region, but my guess is that containers are not allowed to do that by default. There might be an option you can pass to docker to allow it, but I don't know what option that would be.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.