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

Unable to transform between frames for which transform exists

asked 2018-12-17 05:09:28 -0500

aPonza gravatar image

updated 2018-12-18 05:34:51 -0500

Loading objects in the planning scene with moveit::planning_interface::PlanningSceneInterface::addCollisionObjects results in error Unable to transform from frame 'world' to frame '/panda_link0'. Returning identity..

  • I tracked down the issue to moveit::core::getTransform which gets called by the interface which calls methods from planning_scene, here.

  • At the same time, I'm 100% sure the transform exists before publishing the objects, because 1) prior to adding the object I sleep and spin until the transform is available; 2) I can see it if I rosrun tf2_tools view_frames.py.

  • I tried to update moveit's internal map of transforms using planning_scene_monitor::PlanningSceneMonitor::updateFrameTransforms(), and checking the last update was recent with getLastUpdateTime (it is 0.2s - 0.25s ago); This issue discusses the same procedure.

  • Restarting my node (only) doesn't display the error at all, so it really seems an "update" issue.

More details on what I might be doing wrong:

  • I'm sending a collision object with collision_object.header.frame_id = my_object.getPose().header.frame_id; which is initialized elsewhere to be the string "world";
  • I'm publishing the equivalent of writing this transform:
auto static_transform_stamped = geometry_msgs::TransformStamped {};
static_transform_stamped.header.stamp = ros::Time::now();
static_transform_stamped.header.frame_id = "world";
static_transform_stamped.child_frame_id = "panda_link0";
static_transform_stamped.transform.translation.x = 0.0;
static_transform_stamped.transform.translation.y = 0.0;
static_transform_stamped.transform.translation.z = 0.0;
static_transform_stamped.transform.rotation.w = 1.0;
static_transform_stamped.transform.rotation.x = 0.0;
static_transform_stamped.transform.rotation.y = 0.0;
static_transform_stamped.transform.rotation.z = 0.0;

on a topic and sending it (after aggregation happens) in a separate node (as per #310440) but, as I said previously, I'm also sleeping and spinning until said transform is live before even attempting to add objects to the collision scene.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-01-09 10:05:45 -0500

aPonza gravatar image

I couldn't find a fix to the error, I ended up switching to moveit::planning_interface::PlanningSceneInterface::applyCollisionObjects which seems to mostly work without errors so far.

edit flag offensive delete link more

Comments

I have the same error when trying to place workpieces in a UF_PALETTE Frame in Rviz. One way to may overcome this would be to write a listener which looks up the transform and add the offsets manually in your main program where you are adding the object.

Thats a little tedious though in my opinion.

cpetersmeier gravatar image cpetersmeier  ( 2019-07-09 02:31:21 -0500 )edit

Question Tools

3 followers

Stats

Asked: 2018-12-17 05:09:28 -0500

Seen: 1,437 times

Last updated: Jan 09 '19