-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
stop_traj_mode
: "Couldn't stop trajectory mode: unknown error"
#76
Comments
If the internal queue is full and there's pending point to be processed, we're only giving it 20 ms to finish processing. Lines 1012 to 1028 in 2d2b62d
Immediately following that though, I think we should remove that timeout loop and remove the |
I believe what you write, but in the test the robot had already come to a complete stop. |
I ran into the same issue as described originally. I had set the
I am guessing this is because I confirm that the trajectory was finished and the robot was not moving, we actually waited for an extra minute just in case when verifying this behavior. |
I ran into a similar issue running an HC10DT and YRC1000micro. While in |
I did a small code trace of where this issue could be occurring: motoros2/src/ServiceStopTrajMode.c Lines 58 to 65 in b066b5f
Inside MotionControl.c: Ros_MotionControl_StopMotion() does no early exiting, so the function will complete even if a single part of its process runs into issues. The function returns (bStopped && bRet) bStopped is checking if the control groups have any data left. bRet is the return value of ROS_MotionControl_ClearQ_ALL(), this value is always TRUE. So the error is being generated from this loop in Ros_MotionControl_StopMotion(): Lines 1225 to 1243 in b066b5f
I believe g_Ros_Controller.ctrlGroups[i]->hasDataToProcess would be the incorrect field to use due to hasDataToProcess is actually just a flag saying if a control group should be using the queue system, it isn't checking if there is any data available when in PointQueueMode |
Thanks for looking into this @yai-rosejo.
this makes sense to me. I believe we just tried to reuse the already existing |
@gavanderhoorn Would we want to add a Ros_MotionControl_IsMotionMode_Trajectory conditional before the for loop in Ros_MotionControl_StopMotion()? |
While testing the node described in #66, I ran into the following problem.
Invoking the
stop_traj_mode
service returned:debug log:
This was after queuing points for a couple of trajectories using MoveIt.
Edit:
INIT_ROS
was terminated, and servos eventually also de-energised. Not sure what the error cause really was.The text was updated successfully, but these errors were encountered: