MoveIt! Access the pose of a CollisionObject
Hi all,
I need to perform transformations between all objects manipulated by the robot. So I intended to create a thread to publish a tf::Transform at the center of each CollisionObject at, say, 50Hz. But to do that I need to access the pose of the collision objects in real time with respect to some frame (base_link for instance). Is this pose published somewhere in a topic, accessible through a service or is present in some field?
I am the one defining the initial position of all CollisionObject and asking the robot to take/leave this object, so thanks to the position of the end effector I could update my own copy of the pose but:
1) This value is necessarily known by MoveIt! to display the objects 2) It's annoying to wonder when the pose has or has not changed 3) If I do it the pose would be duplicated with the internal value of MoveIt!
Another question: is the field frame_id of a CollisionObject used by MoveIt? I would like to anchor an object (e.g. a cup of tea) to another (e.g. a tray) and ask the robot to manipulate the tray (with moveit_msgs::AttachedCollisionObject.lik_name = end effector of the robot). The goal is obiously to keep the cup fastened to the tray. I wanted to set the frame_id of the cup to the tray like I would so with a regular RViz marker for that but apparently this field is not used, the two CollisionObjects are not linked. Any clue to achieve this goal?
Many thanks for your help