0
$\begingroup$

I have an RC-Car that has object detection and distance estimation implemented. I want the car to stop if it detects a red light while navigating from point A to B. Once the light changes, it should continue navigating to the final destination. I’m relatively new to the navigation stack, so I’m a bit lost with this problem. I’ve read some documentation and tutorials from the nav2 tutorials and have found only these possible ways to implement this:

  1. Utilize the Follow Dynamic Point behavior to calculate a new updated path to the point in front of a traffic light using odometry information. In this approach, I’m not sure how exactly I can measure new coordinates. In case of an error, there could be some deviation from the initial trajectory, which might lead to rotation at the new endpoint.

  2. Implement the Cancel Control Action and update the path as needed later. However, I’m unsure if it’s possible to do this using ROS2 Foxy (I can’t use another ROS2 distribution), as this plugin seems to be available starting from Humble.

  3. Write a custom plugin using C++ to cancel the “FollowPath” action.

Are there other ways to achieve this? I’m completely sure that due to my lack of expertise in navigation, I’m missing some crucial aspects and potential future problems. I would appreciate any information and thoughts!

P.S. Apologies if I missed a discussion where this issue was already addressed.

$\endgroup$

1 Answer 1

0
$\begingroup$

I think the simplest way is to make the system somehow ignores the cmd_vel published by Nav2. In my cases usually I would lime to achieve something similar by using an Emergency Stop. Whenever my micro-ROS detect E-Stop conditions it will ignore the cmd_vel and send stop command to the motors. Once the E-Stop is released then it will continue to listen to the cmd_vel. No issue with the Nav2 stack so far

$\endgroup$
3
  • $\begingroup$ Thank you for your response! It seems that even after a long period of remaining still, the system doesn't activate a 'stuck' condition, which could result in a failure in the 'Follow path' action. Can you please confirm or correct my understanding? $\endgroup$
    – dmalad
    Jan 16 at 15:34
  • $\begingroup$ Hi, sorry for the late reply. I believe if your robot stop responding to the cmd_vel after some times it could trigger the Nav2 BT failure $\endgroup$ Feb 21 at 16:51
  • $\begingroup$ Thanks. In the end i decided just to recalculate the goal position in front of the traffic light, also not the best solution, but at least a stable one $\endgroup$
    – dmalad
    Feb 29 at 7:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.