Skip to content

can't set a Descartes pose sampler on Profile #50

@jf---

Description

@jf---

Hi,

First, what a formidable library, so stoked having access to tesseract from python!

I'd like to contribute by porting examples from tesseract-robotics/tesseract_planning/tree/master/tesseract_examples/src to python. Also its a nice way to find my way around ;)

I'm porting a Descartes tutorial from ROS-I training ,

from tesseract_robotics.tesseract_motion_planners_descartes import (
    cast_DescartesPlanProfileD,
    DescartesDefaultPlanProfileD,
    sampleToolZAxis,
    PoseSamplerFn,
)


def test_zaxis_descartes():
    """

    implement the ROS-I tutotial on descartes
    basically is akin to the `puzzle_piece_example.py`, but using the `descartes` lib over `trajopt`

    https://industrial-training-master.readthedocs.io/en/melodic/_source/session5/Advanced-Descartes-Path-Planning.html

    """
    plan_profile = DescartesDefaultPlanProfileD()
    # DescartesDefaultPlanProfileD is not upcasting automatically, use helper function
    plan_profile1 = cast_DescartesPlanProfileD(plan_profile)
    pp = PoseSamplerFn(sampleToolZAxis)
    plan_profile.target_pose_sampler = pp


#     plan_profile.target_pose_sampler = pp
#     Traceback (most recent call last):
#     File "C:\Program Files (x86)\JetBrains\PyCharm 2022.3.3\plugins\python\helpers\pydev\_pydevd_bundle\pydevd_exec2.py", line 3, in Exec
#     exec(exp, global_vars, local_vars)
# File "<input>", line 1, in <module>
# File "C:\Users\jelle\miniconda3\envs\compas\lib\site-packages\tesseract_robotics\tesseract_motion_planners_descartes\tesseract_motion_planners_descartes_python.py", line 34, in set_instance_attr
# set(self, name, value)
# TypeError: in method 'DescartesDefaultPlanProfileD_target_pose_sampler_set', argument 2 of type 'tesseract_planning::PoseSamplerFn *'
# pp

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions