Moving CollisionObject in Moveit by moving its parent frame
Hi,
I am adding a collision object to my planning_scene. When moving the parent frame I want the object to move. However, they do not.
I know, I can move a collision object by using the MOVE
operation and giving it a new pose. Using MOVE
with the same pose (as the object should move because of the moving parent frame) does not work.
Is there a way to achieve the desired behaviour and if, how? Changing the object's pose is not an option.
Thank you in advance!
Edit:
I tried the following:
- Add the parent frame of object with static_frame_publisher, add the object, then move the robot. All while updating the object with
MOVE
. - Add the parent frame, move the robot, then add the object. All while updating the object with
MOVE
.
Both result in the object being put into the planning scene at the exact position of its parent frame when the robot is in its initial state and never move despite being updated. So I update the frame itself, I update the object with MOVE
. I can see the frame moving in RViz. This makes me believe, I somehow forgot to update the frames in my move_group. How would I do that?
Edit2: When I update the move group namespace in RViz, some things get reloaded and the pose of my object gets updated as well.
Plus, I can confirm that moveit does not get the correct robot states although my move_group node listens to the correct joint states topic. I am using the move_group interface
this->move_group_interface = new moveit::planning_interface::MoveGroup(moveit::planning_interface::MoveGroup::Options(<group_name>));
to read the joint states:
this->move_group_interface->getCurrentJointValues();
Although the joint states published on the joint_states topic are all correct, when I move the robot, the joint values read from the move_group interface are all zero (my initial joint state). I am using the /powerball/joint_states
instead of /joint_states
but my move_group node subscribes to the correct topic. So at least, the information makes it to the node. I probably am missing a simple setting. If I could set the current joint state for moveit manually, that would be fine as well.
Edit3:
MoveIt does get the correct robot states. Nonetheless, the object does not move despite its parent frame moving and being updated with MOVE
(no change in pose,updated timestamp)