-
Notifications
You must be signed in to change notification settings - Fork 29
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
Feature/selective aruco detect #5
Feature/selective aruco detect #5
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feature is really helpful, greatly appreciate your contribution and help in testing this on your robots!! Able to toggle off the aruco_detect
greatly reduce the CPU usage during idle. The 'debug mode" recommendation is great to have, so hopefully this can also be included in this pr.
…to feature/selective_aruco_detect
------------------------------------------- Default true, when false: 1. selectively enable/disable aruco detections 2. turn off viz markers
@youliangtan I have updated the PR with your recommendations. Try it with the following two launch variations: Default behavior when
Note: Even though it was not in the scope of our original conversation, I used parameter to turn "off" the timer used to publish debug viz markers to visualize in |
I tested the |
…uest osrf#5) Added parameter to enable/disable ros service for stop charging Release: autodockv5.1 Approved-by: Alex Chua Zhi Hao
Hello!
This PR is adjacently related to this issue that I reported. However it does not directly fix that. While I was debugging the issue, I found that the
aruco_detect
node was also consuming CPU when the autodock algorithm was idle. Screenshot ofhtop
shown below showsaruco_detect
CPU consumption when IDLE:Ideally, we should not be detecting/looking for aruco markers until an
AutoDock
action itself is started. But it seems like on default config, thearuco_detect
is always on and looking for these markers resulting in high CPU consumption. Looking into this further, thearuco_detect
node DOES have a neat service called/enable_detections
that lets us enable/disable detections. So without touching the source code foraruco_detect
, we will be able to manage the state of these detections from the autodock node itself.This PR primarily helps implement this with the following changes:
Some screenshots below from interactive testing with Turtlebot sim:
Below, you can see that
aruco_detect
consumption has reduced when the autodock is idle:On startup itself, we disable detections so when the sim is launched with the
rviz
, we will NOT see any images from the/fiducial_images
topic:Below, you can see that
aruco_detect
is back to normal consumption when autodock is in progress:Now we start seeing images on the
/fiducial_images
topic:When autodock fails:
When autodock succeeds:
Note that in
rviz
, once the docking action is complete, the image will look "frozen". That is because, we disable detections at the end of the action andaruco_detect
will stop publishing to the/fiducial_images
topic.Points to ponder:
debug
flag is passed for ease of debugging which in essence will turn off this feature and go back to previous default behavior?/enable_detections
service succeeding. In the event of failure of this service, we rely on theAutodock
action's built-in retry mechanism to re-call the service instead of its own retry. I thought it was easier to keep track of the retries this way and conceptually consider that enabling/disabling detections is part of the docking algorithm itself.