Robotics StackExchange | Archived questions

UR5 tabletop collision avoidance

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 ***")

Asked by sisko on 2019-03-25 08:40:27 UTC

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?

Asked by gvdhoorn on 2019-03-25 09:14:41 UTC

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

Asked by sisko on 2019-03-25 10:48:27 UTC

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.

Asked by gvdhoorn on 2019-03-25 11:24:22 UTC

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 ??

Asked by sisko on 2019-03-25 12:05:32 UTC

Answers