current_state.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 = "current state"
13 
14 # Get the current robot state
15 currentState = stages.CurrentState("current state")
16 
17 # Add the stage to the task hierarchy
18 task.add(currentState)
19 
20 if task.plan():
21  task.publish(task.solutions[0])
22 time.sleep(1)
moveit::task_constructor


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