You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to implement a std_msgs::String callback that would read a JSON message containing the target pose coordinates. I am starting from the following tutorial.
When I publish a message, triggering this callback, I get the following console output and a segmentation fault:
[ INFO] [1678720867.821292451]: Loading robot model 'panda'...
[ INFO] [1678720868.959599725]: Ready to take commands for planning group panda_arm.
[ INFO] [1678720869.969216552]: Didn't receive robot state (joint angles) with recent timestamp within 1 seconds.
Check clock synchronization if your are running ROS across multiple machines!
Your environment
ROS Distro: Noetic
OS Version: Ubuntu 20.04
Expected behaviour
I would expect to see a movement plan on RVIZ after publishing one message in this topic.
Basically, my question is, what would be the best way to implement MoveIt in ROS Callback functions?
EDIT:
Ok I think I fixed it. I needed to construct an AsyncSpinner with 2 threads instead of one: one thread for the callback and another one for MoveIt, I guess?
The text was updated successfully, but these errors were encountered:
MoveIt's MoveGroupInterface (MGI) and PlanningSceneInterface (PSI) both themselves make heavy use of ROS message communication. As you are calling them from the one and only spinner thread handling ROS messages, these messages cannot be served. Create a class instantiating (and keeping) MGI and PSI for its whole life time and make your callback a method of that class. That should solve your issue.
Description
I'm trying to implement a std_msgs::String callback that would read a JSON message containing the target pose coordinates. I am starting from the following tutorial.
My first attempt was the following:
With the main function being:
When I publish a message, triggering this callback, I get the following console output and a segmentation fault:
Your environment
Expected behaviour
I would expect to see a movement plan on RVIZ after publishing one message in this topic.
Basically, my question is, what would be the best way to implement MoveIt in ROS Callback functions?
EDIT:
Ok I think I fixed it. I needed to construct an AsyncSpinner with 2 threads instead of one: one thread for the callback and another one for MoveIt, I guess?
The text was updated successfully, but these errors were encountered: