moveit / moveit_ros

THIS REPO HAS MOVED TO https://github.com/ros-planning/moveit
69 stars 118 forks source link

update frame transforms on new PlanningSceneMessage (updated #652) #690

Closed v4hn closed 8 years ago

v4hn commented 8 years ago

This fixes some issues where objects are added w.r.t. some frame but moveit didn't know about the frame yet.

I don't see a reason why this shouldn't be done.

@marcoesposito1988 for reference.

davetcoleman commented 8 years ago

Original PR: https://github.com/ros-planning/moveit_ros/pull/652

davetcoleman commented 8 years ago

+1 but i don't know enough about this part of MoveIt!

v4hn commented 8 years ago

After a bit of investigation it turns out it's a bad idea to update the frames here: It adds a lot of computational overhead because with this change every PlanningSceneMonitor with an active scene monitor would update its transform cache on every received Scene. For a PlanningSceneMonitor monitoring "move_group/monitored_planning_scene" this is a lot of unnecessary updates.

As the caches are updated for messages via "collision_object", "planning_scene_world", and "attached_collision_object" and when using the "apply_planning_scene" service, there are plenty of ways to avoid the issue mentioned by @marcoesposito1988 .

We might want to think about lazy updates to the transform cache if we hit an object we can't transform instead of updating preventively. I'm not sure whether the current code structure allows for that though.