Skip to content

Commit cb7ff0c

Browse files
committed
Update readme
1 parent 3814827 commit cb7ff0c

File tree

1 file changed

+23
-16
lines changed

1 file changed

+23
-16
lines changed

README.md

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
# Tesseract Python
22

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)
44

55
![PyPI](https://img.shields.io/pypi/v/tesseract-robotics)
66

77
Platform | CI Status
88
---------------------|:---------
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)
119
Wheels | [![Build Status](https://github.com/tesseract-robotics/tesseract_python/actions/workflows/wheels.yml/badge.svg)](https://github.com/tesseract-robotics/tesseract_python/actions)
1210

1311
[![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
2321
(tesseract_viewer_python)
2422

2523
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+.
2725

2826
The Tesseract Python package is developed and maintained by Wason Technology, LLC.
2927

@@ -39,18 +37,17 @@ See https://tesseract-robotics.github.io/tesseract_python/ for documentation.
3937

4038
Standalone packages are provided on PyPi (pip install) for Windows and Linux, containing Tesseract, Tesseract
4139
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
4442

4543
To install on Windows:
4644
```
4745
python -m pip install tesseract-robotics tesseract-robotics-viewer
4846
```
49-
To install on Ubuntu 20.04 and Ubuntu 22.04:
47+
To install on Ubuntu 24.04 and Ubuntu 22.04:
5048

5149
```
5250
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
5451
python3 -m pip install -U pip
5552
python3 -m pip install --user tesseract_robotics tesseract_robotics_viewer
5653
```
@@ -115,7 +112,7 @@ import numpy as np
115112
import numpy.testing as nptest
116113

117114
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
119116
from tesseract_robotics.tesseract_common import FilesystemPath, Isometry3d, Translation3d, Quaterniond, \
120117
ManipulatorInfo, AnyPoly, AnyPoly_wrap_double
121118
from tesseract_robotics.tesseract_command_language import CartesianWaypoint, WaypointPoly, \
@@ -125,9 +122,10 @@ from tesseract_robotics.tesseract_command_language import CartesianWaypoint, Way
125122
AnyPoly_wrap_CompositeInstruction, DEFAULT_PROFILE_KEY, JointWaypoint, JointWaypointPoly, \
126123
InstructionPoly_as_MoveInstructionPoly, WaypointPoly_as_StateWaypointPoly, \
127124
MoveInstructionPoly_wrap_MoveInstruction, StateWaypointPoly_wrap_StateWaypoint, \
128-
CartesianWaypointPoly_wrap_CartesianWaypoint, JointWaypointPoly_wrap_JointWaypoint
125+
CartesianWaypointPoly_wrap_CartesianWaypoint, JointWaypointPoly_wrap_JointWaypoint, \
126+
AnyPoly_wrap_ProfileDictionary
129127

130-
from tesseract_robotics.tesseract_task_composer import TaskComposerPluginFactory, PlanningTaskComposerProblem, \
128+
from tesseract_robotics.tesseract_task_composer import TaskComposerPluginFactory, \
131129
TaskComposerDataStorage, TaskComposerContext
132130

133131
from tesseract_robotics_viewer import TesseractViewer
@@ -200,7 +198,8 @@ factory = TaskComposerPluginFactory(config_path)
200198
task = factory.createTaskComposerNode("FreespacePipeline")
201199

202200
# 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")
204203

205204
# Create a profile dictionary. Profiles can be customized by adding to this dictionary and setting the profiles
206205
# in the instructions.
@@ -209,18 +208,26 @@ profiles = ProfileDictionary()
209208
# Create an AnyPoly containing the program. This explicit step is required because the Python bindings do not
210209
# support implicit conversion from the CompositeInstruction to the AnyPoly.
211210
program_anypoly = AnyPoly_wrap_CompositeInstruction(program)
211+
environment_anypoly = AnyPoly_wrap_EnvironmentConst(t_env)
212+
profiles_anypoly = AnyPoly_wrap_ProfileDictionary(profiles)
212213

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)
216219

217220
# Create an executor to run the task
218221
task_executor = factory.createTaskComposerExecutor("TaskflowExecutor")
219222

220223
# 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)
222225
future.wait()
223226

227+
if not future.context.isSuccessful():
228+
print("Planning task failed")
229+
exit(1)
230+
224231
# Retrieve the output, converting the AnyPoly back to a CompositeInstruction
225232
results = AnyPoly_as_CompositeInstruction(future.context.data_storage.getData(output_key))
226233

0 commit comments

Comments
 (0)