ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
I've never had a problem running ROS with threads. Are you calling ros::spinOnce() to poll for updates?
2 | No.2 Revision |
I've never had a problem running ROS with threads. Are you calling ros::spinOnce() to poll for updates?
I've never used pthread
, but I know for a fact that it works with boost::thread
. I know that doesn't solve your issue, but it's something to consider. But since it's really just a nice wrapper for pthreads
on *Nix systems, it doesn't really explain the problem.
3 | No.3 Revision |
I've never had a problem running ROS with threads. Are you calling ros::spinOnce() to poll for updates?
I've never used pthread
, but I know for a fact that it works with boost::thread
. I know that doesn't solve your issue, but it's something to consider. But since it's really just a nice wrapper for pthreads
on *Nix systems, it doesn't really explain the problem.
EDIT:
Try passing a this
pointer to pthread_create()
. Since the ros::init()
is called in the parent class, you need to have access to the ROS variables in your thread.