UR5 tabletop collision avoidance

asked 2019-03-25 08:40:27 -0600

sisko gravatar image

updated 2019-03-25 08:49:23 -0600

Hello.

I'm using a custom moveit based package to generate a sequence of random poses on a UR5 manipulator. My problem is the pose, as visualised in RVIZ, goes down beneath the "surface" i:e negative in the Z axis. Of course, that is not a problem in RVIZ but it is in the real world.

So, I would like to know how I can avoid collisions with the surface the UR5 is fixed to?

Currently I'm checking if the pose.position.z on the Z axis is lower that 0, below, but it seems to block all my randomly generated poses though my output show not all the poses have z position value less than 0.

Plus, I'm open to suggestions of a better way.

if(pose.position.z > 0):
  manipulator.set_pose_target(pose)
  plan = manipulator.plan()
  manipulator.go()
  rospy.loginfo("Move-To-Pose completed!")
else:
  rospy.logerr("*** Move-To_Pose aborted. Z-Axis too low. Risk of collision ***")
edit retag flag offensive close merge delete

Comments

Model the environment your robot is placed in (in the real world) and use that as collision objects for your MoveIt configuration package? Your robot is currently probably floating in an (almost) empty world?

gvdhoorn gravatar imagegvdhoorn ( 2019-03-25 09:14:41 -0600 )edit

Yes. It is. Aside from a turtlebot, there is nothing else in the world.

sisko gravatar imagesisko ( 2019-03-25 10:48:27 -0600 )edit

You'll want to model more than that. Add a floor for instance, or a table. That will immediately tell MoveIt that poses that collide with those pieces of world geometry are invalid.

gvdhoorn gravatar imagegvdhoorn ( 2019-03-25 11:24:22 -0600 )edit

Thanks. I'm looking into it now but I have found so far is creating a copy of the gazebo.world file and editing the original so it contains the models I am trying to include. But that works in launching ur_gazebo, how do the same model definitions get accounted for in ur_bringup ??

sisko gravatar imagesisko ( 2019-03-25 12:05:32 -0600 )edit