Ask Your Question
0

Moving CollisionObject in Moveit by moving its parent frame

asked 2017-08-11 09:57:08 -0500

Marcel Usai gravatar image

updated 2017-08-29 07:53:04 -0500

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)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-08-14 05:51:30 -0500

v4hn gravatar image

Internally, MoveIt works with one planning frame, so changing the frames does not affect the pose of previously added objects.

The MOVE operation is meant to allow the user to change the pose when required.

Using MOVE with the same pose (as the object should move because of the moving parent frame) does not work.

Please elaborate on this. This sounds like a valid way to go to me and I believe it should work. Did you update the time stamp of the collision object you move? Otherwise this would probably use the previous transform even though the current transform is different.

edit flag offensive delete link more

Comments

First, I start my robot. Then, I ADD an object to the planning scene to one of the robot's frames. To make the object move, I tried using MOVE, but with the same pose as with ADD. (I thought maybe that would "refresh" the object. Using ADD-REMOVE-ADD-REMOVE-ADD-.... didn't work either.

Marcel Usai gravatar image Marcel Usai  ( 2017-08-15 02:02:42 -0500 )edit

I updated the stamp of the collision object message

Marcel Usai gravatar image Marcel Usai  ( 2017-08-15 02:23:11 -0500 )edit

This is supposed to work and I'm not aware of reported bugs here. So either you made a mistake in your setup or there is an undiscovered bug in the MOVE code. Please file a bug report with the moveit repository, in the best case including a source that demonstrates the problem.

v4hn gravatar image v4hn  ( 2017-08-15 05:25:57 -0500 )edit

I think, this is a similar issue as in https://github.com/ros-industrial/ind... So, I guess, moveit never records the changes in the joint states and therefore, my CollisionObject never moves.

Marcel Usai gravatar image Marcel Usai  ( 2017-08-15 11:18:43 -0500 )edit

I tried this: add a frame to one of the robot frames, move the robot (which moves the new frame), add my CollisionObject. The object is not placed at the current origin of its parent frame but at the origin as if the robot never moved.

I do not think this has to do with MOVE at all (any more).

Marcel Usai gravatar image Marcel Usai  ( 2017-08-15 11:21:27 -0500 )edit

How do you "add a frame"? And which interface did you use to add the CollisionObject?

v4hn gravatar image v4hn  ( 2017-08-15 13:02:25 -0500 )edit

For frames, I use a static_transform_publisher and for the CollisionObject I use the planning_scene topic interface

Marcel Usai gravatar image Marcel Usai  ( 2017-08-15 14:46:16 -0500 )edit

I updated my question, moveit gets the updated joint states. but the object still does not move. So if using MOVE with the same pose but an updated time stamp should make the object move when the parent frame has moved, I think there is a bug. - So either there is a bug or this shouldn't work...

Marcel Usai gravatar image Marcel Usai  ( 2017-08-29 08:09:21 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2017-08-11 09:57:08 -0500

Seen: 720 times

Last updated: Aug 29 '17