Quantcast
Channel: ROS Answers: Open Source Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 1441

How to add constraints to the moveit database?

$
0
0
I'm trying to add an orientation constraint to the moveit database so I can use it for benchmarking afterward. My current steps are: 1. Start my moveit/rviz launch file (equivalent to the default *demo.launch* of the moveit setup assistant) with the `db:=true` argument. 2. Connect to the database in rviz 3. Start my python script where I use the *moveit_commander*. The most important steps are: moveit_commander.roscpp_initialize(sys.argv) self.robot = moveit_commander.RobotCommander() self.scene = moveit_commander.PlanningSceneInterface() self.move_group = moveit_commander.MoveGroupCommander('box_gripper') self.move_group.set_constraints_database( '127.0.0.1', 33829) constraint = Constraints() constraint.name = "tilt constraint" tilt_constraint = OrientationConstraint() tilt_constraint.header.frame_id = "base_link" tilt_constraint.link_name = "box_gripper_link" tilt_constraint.orientation = Quaternion(0.5, 0.5, 0.5, 0.5) tilt_constraint.absolute_x_axis_tolerance = pi / 3 tilt_constraint.absolute_y_axis_tolerance = pi tilt_constraint.absolute_z_axis_tolerance = pi / 4 tilt_constraint.weight = 1 constraint.orientation_constraints = [tilt_constraint] self.move_group.set_path_constraints(constraint) During these steps, I get no errors but the constraint doesn't appear in the rviz drop-down list. Are there some steps missing? Or is it not possible at all with the *moveit_commadner*?

Viewing all articles
Browse latest Browse all 1441

Trending Articles