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

ROS2 client for navigation2 #106

Merged
merged 7 commits into from
Nov 10, 2021
Merged

ROS2 client for navigation2 #106

merged 7 commits into from
Nov 10, 2021

Conversation

eliasdc
Copy link
Contributor

@eliasdc eliasdc commented Nov 8, 2021

Implemented feature

ROS 2 navigation stack client #84

Implementation description

The implementation replicates the behavior of the ROS1 free fleet client targeting the main branch, as the develop branch is still under active development.

We could not wait for the refactoring results of develop, but I'll be glad to refactor this code once it's done.

aaronchongth and others added 5 commits November 8, 2021 17:33
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
Signed-off-by: Elias De Coninck <elias@tractonomy.com>
Signed-off-by: Elias De Coninck <elias@tractonomy.com>
@eliasdc eliasdc changed the base branch from feature/nav2-client to main November 8, 2021 16:35
Copy link
Member

@aaronchongth aaronchongth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello! Thank you for the initiative, I did a quick review of the code, and tried out the minor tests. Other than the minor comments I have given, it is generally good to merge.

I have been putting together a simulation example for this client as well, which I will merge in after this gets merged. And possibly fix minor things like linting and documentation.

ff_examples_ros2/launch/fake_client.launch.xml Outdated Show resolved Hide resolved
free_fleet_client_ros2/package.xml Show resolved Hide resolved
Signed-off-by: Elias De Coninck <elias@tractonomy.com>
Signed-off-by: Elias De Coninck <elias@tractonomy.com>
@eliasdc
Copy link
Contributor Author

eliasdc commented Nov 10, 2021

Thanks for the review. For the request_path it would be better to change it to navigate_through_poses instead of navigate_to_pose. I can update and test this code with it if you want. I think it would make more sense as now the robot stops on each waypoint.

@mxgrey
Copy link
Collaborator

mxgrey commented Nov 10, 2021

I'm not familiar with Nav2 so I apologize if this comment is noise, but one thing to watch out for if you use a navigate_through_poses command instead of a navigate_to_pose command is that the time field of the command from RMF is important for avoiding traffic conflicts with other robots. If a navigate_through_poses command is issued and that command doesn't prevent the robot from passing a waypoint before the prescribed time, then the robot may drive itself into conflicts because it was supposed to wait for another robot to pass.

We have some improvements in development that will make the commander smart enough to know information like "I can safely have the robot move through some [ x, y, z ] sequence of waypoints with any timing and no risk of conflicts happening", but the current system doesn't have that intelligence yet, so it's sensitive to the timing.

@eliasdc
Copy link
Contributor Author

eliasdc commented Nov 10, 2021

I'm not familiar with Nav2 so I apologize if this comment is noise, but one thing to watch out for if you use a navigate_through_poses command instead of a navigate_to_pose command is that the time field of the command from RMF is important for avoiding traffic conflicts with other robots. If a navigate_through_poses command is issued and that command doesn't prevent the robot from passing a waypoint before the prescribed time, then the robot may drive itself into conflicts because it was supposed to wait for another robot to pass.

That's a good point. With navigate_through_poses I can't indeed handle timings of each waypoint. It would immediately see the end goal as a target. Maybe canceling an active path could work if the robot is reaching it's target to soon but that is less clean.

We have some improvements in development that will make the commander smart enough to know information like "I can safely have the robot move through some [ x, y, z ] sequence of waypoints with any timing and no risk of conflicts happening", but the current system doesn't have that intelligence yet, so it's sensitive to the timing.

Conclusion: I'll wait until these new features are included before changing the behavior.

@aaronchongth
Copy link
Member

Thanks for getting back so quickly, @eliasdc! That certainly sounds like it will make navigation through a path much smoother! However as @mxgrey pointed out, the time at which the robot is expected to arrive at the pose or wait on the pose is critical to work with RMF, hence it might not be a good idea.

I see that NavigateThroughPoses have feedback for number of waypoints remaining, you are right and we could have a workaround by pausing and resuming the robot. But that would make path planning a little more expensive as it needs to plan to the end goal every time it arrives at the waypoint.

Again thanks for the help so far, I will merge this, and I'll get some documentation and simulation examples in.

Copy link
Member

@aaronchongth aaronchongth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@aaronchongth aaronchongth merged commit 634b4c2 into open-rmf:main Nov 10, 2021
@mxgrey
Copy link
Collaborator

mxgrey commented Nov 10, 2021

I think it'll be great to switch to navigate_through_poses once the next iteration of the planner is finished. Then we can issue all the poses at once, up to the next mandatory waiting event.

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

Successfully merging this pull request may close these issues.

3 participants