How to solve pthread_create() failure: EPERM
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);
}