Closed slowrunner closed 2 years ago
@slowrunner You seem to be running into this dock reporting issue with your test setup more than we see it, I wonder if you can play with some numbers for us. The threshold that determines if the robot is docked are here:
irobot_create_gazebo_plugins/include/irobot_create_gazebo_plugins/gazebo_ros_docking_status.hpp
// Docked thresholds
const double DOCKED_DISTANCE{0.075}; // Max distance in meters.
const double DOCKED_YAW{M_PI / 30.0}; // Max Yaw between dock and robot in radians.
If you make small increases to those numbers, does the problem resolve itself? I wonder if our threshold is too tight or if our robot has a very small idle drift from simulator body collisions (this could be tested by leaving the sim on for a long time and seeing if the robot is visibly getting farther away from the dock without reaching a steady state). @rjcausarano Is it possible the robot could be slowly repelled from the dock when it is in contact vs. just drifting from collisions within its own bodies?
our robot has a very small idle drift from simulator body collisions (this could be tested by leaving the sim on for a long time and seeing if the robot is visibly getting farther away from the dock
I was wondering about this as well. After a long time running, when I check back to gazebo, the "walls" that I place using the cube shape, have "walked" away. I have never found the bot visibly off the dock, but perhaps it wobbled and "lost contact"
I changed the two parms to 0.100 and M_PI / 20, rebuilt, and reran the test.
The is_docked started out true. I performed the "dance example twice (until the dock_visible became true).
The first dock goal did not turn the is_docked to true, but a second dock goal did.
After a short while the is_docked again toggled to false.
Here are the position msgs from odom topic docked and "auto magically undocked":
Docked:
sec: 264
nanosec: 153000000
frame_id: odom
child_frame_id: base_link
pose:
pose:
position:
x: 0.0005308739049845198
y: -0.016469340509502824
z: 0.0
orientation:
x: -0.0
y: 0.0
z: 0.0016669600850229475
w: -0.9999986106210723
Automagically undocked:
header:
stamp:
sec: 434
nanosec: 712000000
frame_id: odom
child_frame_id: base_link
pose:
pose:
position:
x: 0.0005294717861749289
y: -0.01646933532131849
z: 0.0
orientation:
x: -0.0
y: 0.0
z: 0.001364338378228047
w: -0.9999990692899617
Hmmm, those positions look pretty close, especially given the increased thresholds. @rjcausarano Any hypotheses?
Create3 battery was run down to 3% then docked successfully.
420 seconds / 7 minutes later charging stopped mysteriously and is_docked found to have toggled to False:
Checked /dock topic much later when noticed charging was no longer happening.
Bot is still located on the dock visibly on the dock. /odom is reporting: