1
1
# Tesseract Python
2
2
3
- [ ![ Python] ( https://img.shields.io/badge/python-3.7 +-blue.svg )] ( https://github.com/tesseract-robotics/tesseract_python )
3
+ [ ![ Python] ( https://img.shields.io/badge/python-3.8 +-blue.svg )] ( https://github.com/tesseract-robotics/tesseract_python )
4
4
5
5
![ PyPI] ( https://img.shields.io/pypi/v/tesseract-robotics )
6
6
7
7
Platform | CI Status
8
8
---------------------|:---------
9
- Linux (Focal) | [ ![ Build Status] ( https://github.com/tesseract-robotics/tesseract_python/workflows/Focal-Build/badge.svg )] ( https://github.com/tesseract-robotics/tesseract_python/actions )
10
- Windows | [ ![ Build Status] ( https://github.com/tesseract-robotics/tesseract_python/workflows/Windows-Noetic-Build/badge.svg )] ( https://github.com/tesseract-robotics/tesseract_python/actions )
11
9
Wheels | [ ![ Build Status] ( https://github.com/tesseract-robotics/tesseract_python/actions/workflows/wheels.yml/badge.svg )] ( https://github.com/tesseract-robotics/tesseract_python/actions )
12
10
13
11
[ ![ Github Issues] ( https://img.shields.io/github/issues/tesseract-robotics/tesseract_python.svg )] ( http://github.com/tesseract-robotics/tesseract_python/issues )
@@ -23,7 +21,7 @@ checking (Bullet, FCL), kinematics (KDL, OPW, UR), planning (OMPL, Descartes, Tr
23
21
(tesseract_viewer_python)
24
22
25
23
Standalone packages are provided on PyPi (pip install) for Windows and Linux, containing all the native dependencies
26
- for Python 3.7 +.
24
+ for Python 3.8 +.
27
25
28
26
The Tesseract Python package is developed and maintained by Wason Technology, LLC.
29
27
@@ -39,18 +37,17 @@ See https://tesseract-robotics.github.io/tesseract_python/ for documentation.
39
37
40
38
Standalone packages are provided on PyPi (pip install) for Windows and Linux, containing Tesseract, Tesseract
41
39
Planning, andall the native dependencies
42
- for Python 3.7 +. These packages have been tested on Windows 10, Ubuntu 20.04 , and Ubuntu 22.04, but should work
43
- on any relatively recent x64 Windows or Linux operating system. Packages are available for Python 3.7 - 3.11.
40
+ for Python 3.8 +. These packages have been tested on Windows 10, and Ubuntu 22.04, but should work
41
+ on any relatively recent x64 Windows or Linux operating system. Packages are available for Python 3.8 - 3.13
44
42
45
43
To install on Windows:
46
44
```
47
45
python -m pip install tesseract-robotics tesseract-robotics-viewer
48
46
```
49
- To install on Ubuntu 20 .04 and Ubuntu 22.04:
47
+ To install on Ubuntu 24 .04 and Ubuntu 22.04:
50
48
51
49
```
52
50
sudo apt install python3-pip python3-numpy
53
- # The supplied version of pip on Ubuntu 20.04 is too old for manylinux_2_31, upgrade pip
54
51
python3 -m pip install -U pip
55
52
python3 -m pip install --user tesseract_robotics tesseract_robotics_viewer
56
53
```
@@ -115,7 +112,7 @@ import numpy as np
115
112
import numpy.testing as nptest
116
113
117
114
from tesseract_robotics.tesseract_common import GeneralResourceLocator
118
- from tesseract_robotics.tesseract_environment import Environment
115
+ from tesseract_robotics.tesseract_environment import Environment, AnyPoly_wrap_EnvironmentConst
119
116
from tesseract_robotics.tesseract_common import FilesystemPath, Isometry3d, Translation3d, Quaterniond, \
120
117
ManipulatorInfo, AnyPoly, AnyPoly_wrap_double
121
118
from tesseract_robotics.tesseract_command_language import CartesianWaypoint, WaypointPoly, \
@@ -125,9 +122,10 @@ from tesseract_robotics.tesseract_command_language import CartesianWaypoint, Way
125
122
AnyPoly_wrap_CompositeInstruction, DEFAULT_PROFILE_KEY , JointWaypoint, JointWaypointPoly, \
126
123
InstructionPoly_as_MoveInstructionPoly, WaypointPoly_as_StateWaypointPoly, \
127
124
MoveInstructionPoly_wrap_MoveInstruction, StateWaypointPoly_wrap_StateWaypoint, \
128
- CartesianWaypointPoly_wrap_CartesianWaypoint, JointWaypointPoly_wrap_JointWaypoint
125
+ CartesianWaypointPoly_wrap_CartesianWaypoint, JointWaypointPoly_wrap_JointWaypoint, \
126
+ AnyPoly_wrap_ProfileDictionary
129
127
130
- from tesseract_robotics.tesseract_task_composer import TaskComposerPluginFactory, PlanningTaskComposerProblem, \
128
+ from tesseract_robotics.tesseract_task_composer import TaskComposerPluginFactory, \
131
129
TaskComposerDataStorage, TaskComposerContext
132
130
133
131
from tesseract_robotics_viewer import TesseractViewer
@@ -200,7 +198,8 @@ factory = TaskComposerPluginFactory(config_path)
200
198
task = factory.createTaskComposerNode(" FreespacePipeline" )
201
199
202
200
# Get the output keys for the task
203
- output_key = task.getOutputKeys()[0 ]
201
+ output_key = task.getOutputKeys().get(" program" )
202
+ input_key = task.getInputKeys().get(" planning_input" )
204
203
205
204
# Create a profile dictionary. Profiles can be customized by adding to this dictionary and setting the profiles
206
205
# in the instructions.
@@ -209,18 +208,26 @@ profiles = ProfileDictionary()
209
208
# Create an AnyPoly containing the program. This explicit step is required because the Python bindings do not
210
209
# support implicit conversion from the CompositeInstruction to the AnyPoly.
211
210
program_anypoly = AnyPoly_wrap_CompositeInstruction(program)
211
+ environment_anypoly = AnyPoly_wrap_EnvironmentConst(t_env)
212
+ profiles_anypoly = AnyPoly_wrap_ProfileDictionary(profiles)
212
213
213
- # Create the task problem and input
214
- task_planning_problem = PlanningTaskComposerProblem(t_env, profiles)
215
- task_planning_problem.input = program_anypoly
214
+ # Create the task data
215
+ task_data = TaskComposerDataStorage()
216
+ task_data.setData(input_key, program_anypoly)
217
+ task_data.setData(" environment" , environment_anypoly)
218
+ task_data.setData(" profiles" , profiles_anypoly)
216
219
217
220
# Create an executor to run the task
218
221
task_executor = factory.createTaskComposerExecutor(" TaskflowExecutor" )
219
222
220
223
# Run the task and wait for completion
221
- future = task_executor.run(task.get(), task_planning_problem )
224
+ future = task_executor.run(task.get(), task_data )
222
225
future.wait()
223
226
227
+ if not future.context.isSuccessful():
228
+ print (" Planning task failed" )
229
+ exit (1 )
230
+
224
231
# Retrieve the output, converting the AnyPoly back to a CompositeInstruction
225
232
results = AnyPoly_as_CompositeInstruction(future.context.data_storage.getData(output_key))
226
233
0 commit comments