Different profile string in CompositeInstruction leads to totally diffenent planning results #563
Replies: 12 comments
-
In the code snippet from this example, we are configuring a TrajOpt profile that is specific to this application under the name tesseract_planning/tesseract_examples/src/basic_cartesian_example.cpp Lines 224 to 231 in 1c6104e If you could post the full TrajOpt log from the last iteration of the optimization, we may be able to identify what costs/constraints were causing the problem |
Beta Was this translation helpful? Give feedback.
-
Thank you for your reply. I create a custom cartesian_program just like the example, now it works well. Here is another question. I wrote a test program that commands the manipulator to follow a circular path in Cartesian space.
The planner can correctly solve the trajectory. However, if I change the point_num to 10 or 20, the planner will fail to find a solution. What is the problem? |
Beta Was this translation helpful? Give feedback.
-
Here is the TrajOpt log from the last iteration of the optimization. The cartesian poses of planned trajectory deviate greatly from the set values. |
Beta Was this translation helpful? Give feedback.
-
A few questions:
The optimization seems to have failed because all of the cartesian position costs ( My guess as to why this fails is that you might not have given TrajOpt a good joint seed for those Cartesian positions, so it got stuck and wasn't able to find a way to meet those constraints. I would recommend adding a |
Beta Was this translation helpful? Give feedback.
-
Could you please give an example how to add a SimplePlanner? |
Beta Was this translation helpful? Give feedback.
-
Update: |
Beta Was this translation helpful? Give feedback.
-
If your robot is redundant and you are not discretely sampling the extra DoF, the It appears the example is using a pipeline that only includes TrajOpt IFOPT. To use the simple planner in conjunction with TrajOpt IFOPT, you'll have to make a custom pipeline that is similar to this one. It would probably look like this: TrajOptIfoptTask:
class: PipelineTaskFactory
config:
conditional: true
inputs: [input_data]
outputs: [output_data]
nodes:
DoneTask:
class: DoneTaskFactory
config:
conditional: false
ErrorTask:
class: ErrorTaskFactory
config:
conditional: false
MinLengthTask:
class: MinLengthTaskFactory
config:
conditional: true
inputs: [input_data]
outputs: [output_data]
+ SimpleMotionPlannerTask:
+ class: SimpleMotionPlannerTaskFactory
+ config:
+ conditional: true
+ inputs: [input_data]
+ outputs: [output_data]
+ format_result_as_input: true
TrajOptIfoptMotionPlannerTask:
class: TrajOptIfoptMotionPlannerTaskFactory
config:
conditional: true
inputs: [output_data]
outputs: [output_data]
format_result_as_input: false
DiscreteContactCheckTask:
class: DiscreteContactCheckTaskFactory
config:
conditional: true
inputs: [output_data]
IterativeSplineParameterizationTask:
class: IterativeSplineParameterizationTaskFactory
config:
conditional: true
inputs: [output_data]
outputs: [output_data]
edges:
+ - source: SimpleMotionPlannerTask
+ destinations: [ErrorTask, MinLengthTask]
- source: MinLengthTask
destinations: [ErrorTask, TrajOptIfoptMotionPlannerTask]
- source: TrajOptIfoptMotionPlannerTask
destinations: [ErrorTask, DiscreteContactCheckTask]
- source: DiscreteContactCheckTask
destinations: [ErrorTask, IterativeSplineParameterizationTask]
- source: IterativeSplineParameterizationTask
destinations: [ErrorTask, DoneTask]
terminals: [ErrorTask, DoneTask] The simple planner has a few profiles that determine how it performs interpolation. Either the LVS (default) or fixed size plan profiles should work here |
Beta Was this translation helpful? Give feedback.
-
Thank you for replying.
but get |
Beta Was this translation helpful? Give feedback.
-
The simple planner is already a part of the
This is exactly the problem described in #399. It appears that your problem is set up incorrectly. Per the discussion on that issue, the better way to solve this issue is to add a TrajOptIfoptTask:
class: PipelineTaskFactory
config:
conditional: true
inputs: [input_data]
outputs: [output_data]
nodes:
DoneTask:
class: DoneTaskFactory
config:
conditional: false
ErrorTask:
class: ErrorTaskFactory
config:
conditional: false
+ ProcessInputTask:
+ class: ProcessPlanningInputTaskFactory
+ config:
+ conditional: false
+ outputs: [input_data]
MinLengthTask:
class: MinLengthTaskFactory
config:
conditional: true
inputs: [input_data]
outputs: [output_data]
+ SimpleMotionPlannerTask:
+ class: SimpleMotionPlannerTaskFactory
+ config:
+ conditional: true
+ inputs: [input_data]
+ outputs: [output_data]
+ format_result_as_input: true
TrajOptIfoptMotionPlannerTask:
class: TrajOptIfoptMotionPlannerTaskFactory
config:
conditional: true
inputs: [output_data]
outputs: [output_data]
format_result_as_input: false
DiscreteContactCheckTask:
class: DiscreteContactCheckTaskFactory
config:
conditional: true
inputs: [output_data]
IterativeSplineParameterizationTask:
class: IterativeSplineParameterizationTaskFactory
config:
conditional: true
inputs: [output_data]
outputs: [output_data]
edges:
+ - source: ProcessInputTask
+ - destinations: [SimpleMotionPlannerTask]
+ - source: SimpleMotionPlannerTask
+ destinations: [ErrorTask, MinLengthTask]
- source: MinLengthTask
destinations: [ErrorTask, TrajOptIfoptMotionPlannerTask]
- source: TrajOptIfoptMotionPlannerTask
destinations: [ErrorTask, DiscreteContactCheckTask]
- source: DiscreteContactCheckTask
destinations: [ErrorTask, IterativeSplineParameterizationTask]
- source: IterativeSplineParameterizationTask
destinations: [ErrorTask, DoneTask]
terminals: [ErrorTask, DoneTask] |
Beta Was this translation helpful? Give feedback.
-
It seems like that KDL fails to generate joint solution for a reachable cartesian pose. Is it possible to switch to a different ik solver? |
Beta Was this translation helpful? Give feedback.
-
Depends on your robot. If it is a 6-DOF spherical wrist robot, you could use the OPW solver. If it's a UR, you can use the UR solvers. Otherwise, the KDL solvers are really the only option at the moment. You could update the seed state in your IK call to be closer to the final solution; that typically helps a lot with making the solver converge |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Hi, I'm using trajopt to plan a trajectory subject to Cartesian waypoint constraints.
If I use the following codes to create the planning program, everything works fine.
However, if I follow the example in basic_cartesian_example.cpp and use:
the planner will fail because some of the waypoint constraints can not be satisfied.
Could someone tell me what is the difference?
Beta Was this translation helpful? Give feedback.
All reactions