ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

How to solve pthread_create() failure: EPERM

asked 2016-06-03 02:41:36 -0600

RohitM gravatar image

updated 2016-06-03 03:20:26 -0600

I am attempting to use the ROBOTIS-Manipulator Code in ROS Indigo on Ubuntu 14.04. It is successfully executing catkin_make but is giving an error in roslaunch. After a lot of time I think that I have figured out that the error is in the following code snippet. I outputted the value of error and as shown below, it is giving 1 => EPERM (No permission to set the scheduling policy and parameters specified in attr). How to solve this error?

Error:

[ INFO] [1464938807.597236403]: error: 1
[ERROR] [1464938807.597311436]: timer thread create fail!!
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::lock_error> >'

Code Snippet:

// create and start the thread
        if((error = pthread_create(&this->timer_thread_, &attr, this->ThreadProc, this))!= 0) {ROS_INFO("error: %d", error);
            ROS_ERROR("timer thread create fail!!");
            exit(-1);
        }
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-06-03 20:56:10 -0600

RohitM gravatar image

The error is easily solved by running as root. But note that it is not enough to run only the roslaunch command with sudo, you must compile and source as root as well. Not sure why that is but it is running smoothly now.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-06-03 02:41:36 -0600

Seen: 1,632 times

Last updated: Jun 03 '16