-
Notifications
You must be signed in to change notification settings - Fork 955
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Failed to fetch current robot state" when running getCurrentPose #1187
Comments
Thanks for reporting an issue. We will have a look asap. If you can think of a fix, please consider providing it as a pull request. |
Solved by |
Solved by ros::AsyncSpinner spinner(1); spinner.start(); |
Just as an explanation: |
How can we set this flag in python? |
Nothing. For me, the following script just works. Do you observe issues? If so, please provide a minimal example. import sys
import rospy
from moveit_commander import MoveGroupCommander, roscpp_initialize
rospy.init_node('foo', anonymous=False)
roscpp_initialize(sys.argv)
group = MoveGroupCommander('panda_arm')
print group.get_current_pose()
print group.get_current_joint_values() |
I figured out what's going on. For baxter, we need to remap one rostopic. I remap it in the launch file but it seems not work. I write them inside scripts again. Before: only remap in the launch file After: remap in launch file and scripts
Do you have idea why I need remap inside scripts again? @rhaschke |
Remapping needs to be done for each and every ROS |
Hi, I am using ROS Indigo and I have had still problem with the getCurrentPose function. However, I ve used aforementioned AsyncSpinner, I have been still getting an error: Failed to fetch current robot state geometry_msgs::PoseStamped actual_pose; |
Solved by adding this part in code
|
Alternative to the remap as suggested by @Hubert51: We just need to run it once and avoid remapping it every time. |
Description
I want to get the pose of the UR5 end effecor using moveit's method
getCurrentPose
, but moveit complainsFailed to fetch current robot state
even thoughrostopic echo -n 1 /joint_states
outputsHere is the code (see how to reproduce for more detail):
moveit suggests
Check clock synchronization if your are running ROS across multiple machines!
, but I am sure this is not the cause:I post this issue here ros-industrial/universal_robot/issues/390, but they direct me here.
Your environment
Steps to reproduce
sudo apt-get install ros-kinetic-universal-robot
Assume you have a catkin_ws and an empty package, create a node with the following code. Add the
moveit_ros_planning_interface
package to CMakeLists.txt andadd_executable(${PROJECT_NAME}_node src/a2_node.cpp)
.Expected behaviour
It should return a geometry_msgs::PoseStamped with the actual pose
Actual behaviour
It returns the default geometry_msgs::PoseStamped
Backtrace or Console output
The text was updated successfully, but these errors were encountered: