fix_collision_objects.py
Go to the documentation of this file.
1 #! /usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 from moveit.task_constructor import core, stages
5 from py_binding_tools import roscpp_init
6 import time
7 
8 roscpp_init("mtc_tutorial")
9 
10 # Create a task
11 task = core.Task()
12 task.name = "fix collision objects"
13 
14 # Add the current state to the task hierarchy
15 task.add(stages.CurrentState("current state"))
16 
17 # [initAndConfig]
18 # check for collisions and find corrections
19 fixCollisionObjects = stages.FixCollisionObjects("FixCollisionObjects")
20 
21 # cut off length for collision fixing
22 fixCollisionObjects.max_penetration = 0.01
23 
24 # Add the stage to the task hierarchy
25 task.add(fixCollisionObjects)
26 # [initAndConfig]
27 
28 if task.plan():
29  task.publish(task.solutions[0])
30 time.sleep(1)
moveit::task_constructor


demo
Author(s): Robert Haschke , Simon Goldstein , Henning Kayser
autogenerated on Sat May 3 2025 02:40:30