Hello,
Please use
answers.ros.org instead of this list.
You dug quite deep into the framework, but you did not
say which interface you actually use to request the execution
of the trajectory. What is the code you execute and what is
the unexpected behavior? If you use move_group's ExecuteTrajectoryAction,
this should already return an error code when the controller returns
GOAL_TOLERANCE_VIOLATED. We don't have this exact error code in MoveItErrorCodes though.
At first glance I would expect CONTROL_FAILED in this case.
v4hn
On Mon, Sep 18, 2017 at 07:25:23AM -0700, Harsh Deshpande wrote:
> I am sending a trajectory to robot arm which uses
> joint_trajectory_controller. After executing the trajectory, I need to
> check if the robot has indeed reached it's goal position before planning
> for the next goal.
>
> My idea was to use the
>
> control_msgs::FollowJointTrajectoryResult::GOAL_TOLERANCE_VIOLATED
>
> which FollowJointTrajectoryControllerHandle should be able to return [1].
> But as can be seen, it always returns true without returning the result of
> the goal. Also the ExecuteTrajectoryAction capability gets the result of
> the trajectroy execution in the form of
>
> moveit_msgs::MoveItErrorCodes [2]. I can implement something like in URDriver.py in my node
>
> def within_tolerance(a_vec, b_vec, tol_vec):
> for a, b, tol in zip(a_vec, b_vec, tol_vec):
> if abs(a - b) > tol:
> return False
> return True
>
> but I want to know if there's any way I could use GOAL_TOLERANCE_VIOLATED.
>
> Thanks!
--
Michael Görner, M.Sc. Cognitive Science, PhD Student
Universität Hamburg
Faculty of Mathematics, Informatics and Natural Sciences
Department of Informatics
Group Technical Aspects of Multimodal Systems
Vogt-Kölln-Straße 30
D-22527 Hamburg
Room: F-315
Phone:
+49 40 42883-2432
Website:
https://tams.informatik.uni-hamburg.de/people/goerner/