Open romesco opened 9 years ago
This has come up several times, but no one seems to have resolved it. The underlying issue is in this line: https://github.com/personalrobotics/ada/blob/master/adapy/src/adapy/adarobot.py#L205
The result of ExecuteTrajectory
is supposed to be an OpenRAVE trajectory, but this code is returning a ROS JointTrajectory, which is totally different. Thus, the subsequent code gets messed up, because it can't do any of the usual postprocessing like setting Tags
.
Someone needs to go in and convert the return of ExecuteTrajectory
from ROS trajectories back to OpenRAVE trajectories. I'm not really sure how this code was originally intended to work in the first place.
@mkoval, comments on this? It looks like you were the last to touch this piece of code.
The logic in that function is mostly correct. We correctly return a Future
if defer=True
and, otherwise, return the trajectory:
if defer:
return traj_future
else:
try:
return traj_future.result(timeout)
except TrajectoryExecutionFailed as e:
logger.exception('Trajectory execution failed.')
The problem is that, like @psigen said, traj_future.result(timeout)
returns a JointTrajectory
message instead of an OpenRAVE Trajectory
. Ideally, we would convert the result to an OpenRAVE Trajectory
, restore the tag(s), and return it.
The quick fix, which is equivalent on ADA, is to simply return the OpenRAVE trajectory that we were passed:
if defer:
return traj_future
else:
try:
traj_future.result(timeout)
return traj
except TrajectoryExecutionFailed as e:
logger.exception('Trajectory execution failed.')
So this particular error was fixed #53 , however, I think we still aren't handling this properly when we error. If a trajectory throws an exception, we end up getting the same error about a traj description.
Still running into issues when trying to plan something as simple as home configuration on real ADA. Not exactly sure what is motivating the failure, but it looks like the planner succeeds and when it goes to execute, there is a failure.
It is throwing an Attribute Error when it tries to call getDescription for a "JoinTrajectory" object in prpy
I am literally running test.py in default ADA and calling "planToNamedConfiguration('home',execute=True)"
Code is attached below.