Closed rcywongaa closed 1 year ago
I created #19994 with a simpler unit test that doesn't require MOSEK.
No matter what I tried, I wasn't able to get it to fail. I tried removing all of the imports except the minimal set like HPolyhedron and GCS. Everything still passed.
We'll need a better recipe for reproducing your problem, before we can try to debug it. Could you share some steps I could try, to see this problem in action? Maybe some sample code?
The PR #19988 doesn't make any sense, because (as mentioned there) the module is already imported, prior to that change. Something else must be going on.
Is there any chance that when you saw the error, you were running with a version of Drake prior to #19938? Maybe due to some PYTHONPATH snafu?
You're right, I must've mixed up the PYTHONPATH in different terminals. Also explains why the issue exists in the notebook since it's using an earlier snapshot.
Sorry for the false alarm.
No problem at all, glad it's working!
What happened?
I get the following error when trying to extract the results from
GcsTrajectoryOptimization.SolvePath()
I tried adding
to https://github.com/RobotLocomotion/drake/blob/master/bindings/pydrake/planning/planning_py_trajectory_optimization.cc and that solved the problem.
It seems the current unit test https://github.com/RobotLocomotion/drake/blob/master/bindings/pydrake/planning/test/trajectory_optimization_test.py does not catch this issue because it already imports
pydrake.trajectories.CompositeTrajectory
Version
57e044df411635a63703cb5e88314dc7be307418
What operating system are you using?
Ubuntu 20.04
What installation option are you using?
compiled from source code using CMake, compiled from source code using Bazel
Relevant log output
No response