Skip to content
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

Backward docking stucks on Humble #68

Open
Jakubach opened this issue Nov 8, 2024 · 5 comments
Open

Backward docking stucks on Humble #68

Jakubach opened this issue Nov 8, 2024 · 5 comments

Comments

@Jakubach
Copy link

Jakubach commented Nov 8, 2024

Hello, when using Backward docking mode the robot correctly reverse to the docking pose but very near docking pose it starts doing in-place circles without the end. The problem only occurs it this mode.
The solution I've found:

The SmoothControlLaw method used in docking server is calculateRegularVelocity(pose, backward) (link) and changing it to that one taking also the robot current pose fixes the problem: calculateRegularVelocity(const geometry_msgs::msg::Pose & target,const geometry_msgs::msg::Pose & current,const bool & backward = false) (link)
I haven't checked that but the problem can also occur in the GracefulController since it's implemented similarly (link).
I also had to delete the lines with backward_projection (428-432) (link) (then I modified it for my case to perform initial in-place rotations).

In summary:

  • Used calculateRegularVelocity(pose,current, backward) instead of calculateRegularVelocity(pose, backward)
  • Commented out the part with backward_projection(and that part does not exist in GracefulController)

After this changes the robot stops correctly in the end point (with default controller parameters)

Screencast.from.11-07-2024.06_53_45.PM.1.webm
Screencast.from.11-08-2024.04_42_24.PM.1.mp4

I will propose that changes on pull request.

@ajtudela
Copy link
Contributor

ajtudela commented Nov 9, 2024

Hi, I think I have a clear idea of what's happening to you:

  • First, make sure that the dock orientation is facing the wall (not at the robot):

image

  • Second, assuming you have sensors in the back to detect the dock, set the staging pose to be reversed using the staging_yaw_offset.

NOTES FOR ME: Improve the documentation for these cases and implement detection+rotate+reverse ASAP.

@Jakubach
Copy link
Author

Jakubach commented Nov 9, 2024

Hi, thank you for your response. I've tried re-orientating the dock pose (rotation by PI around Z) so if the robot pose is [0,0 0] then dock pose is [0,0, PI].
To the second point, my robot has a sensor to detect the dock in a front of it (and charging connectors are on back). I was playing with staging_yaw_offset but the dock detection starts after reaching the staging pose not during reaching that pose (then it could work).

@ajtudela
Copy link
Contributor

ajtudela commented Nov 9, 2024

Unfortunately, your case: sensors in the front and docking pads in the back is not currently supported. There is an open issue in nav2 here.

I saw your PR. If you want to implement this feature, you need to do it in the main branch of Nav2 and I'll review it.

@Jakubach
Copy link
Author

Jakubach commented Nov 9, 2024

I made a PR in the main branch of Nav2

@SteveMacenski
Copy link
Member

This all sounds good, thanks @ajtudela for responding to @Jakubach and helping to review! Its very appreciated :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants