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

Using Simple Commander API for multi robot systems #3668

Closed
AryanArora12 opened this issue Jun 29, 2023 · 9 comments · Fixed by #3803
Closed

Using Simple Commander API for multi robot systems #3668

AryanArora12 opened this issue Jun 29, 2023 · 9 comments · Fixed by #3803

Comments

@AryanArora12
Copy link


Feature request

Using Simple Commander API for multi robot systems. This is in continuation to this post.

Feature description

I am making a multi-robot simulation and for my purposes, I want to use the Python API to send navigation goals to different robots. As of now, I cannot see how to do that with two robots(that is add a namespace and setting up goal poses as well as set initial poses individually for each robot). Any guidance on how to do this would be helpful.

Implementation considerations

I think the solution proposed in the post mentioned earlier sounds good, if not implemented yet.

@SteveMacenski
Copy link
Member

That was outside of the scope of the original "simple" nature of the commander, but it shouldn't be prohibitively difficult to make work and it would be a great contribution back!

I'd add the namespace support and than have a different simple commander object for each of the robots. That should separate them from each other and namespaced by the appropriate services and such.

@AryanArora12
Copy link
Author

Cool! I thought about the same thing but was struggling in adding the namespace functionality. I'll work on it over the next few days and provide an update if I get any progress/or am able to implement that successfully.

@SteveMacenski
Copy link
Member

I think its mostly just adding the namespace when we create all the clients in the python API's constructor!

OK!

@AryanArora12
Copy link
Author

Hey, Thanks for the guidance, I was able to run multiple robots by adding the namespace functionality

@SteveMacenski
Copy link
Member

Whoops wrong button. Can you open a PR? Happy to merge it so others can use!

@AryanArora12
Copy link
Author

AryanArora12 commented Jul 5, 2023

Yeah sure. I'll do a few more tests for sanity check and then open a PR by this week.

@ipa-rar
Copy link

ipa-rar commented Jul 21, 2023

@SteveMacenski Can you check this PR #3701

@SteveMacenski
Copy link
Member

SteveMacenski commented Sep 11, 2023

https://github.com/ros-planning/navigation2/blob/main/nav2_simple_commander/nav2_simple_commander/robot_navigator.py#L50 https://docs.ros2.org/latest/api/rclpy/api/node.html. That might just do everything for us automatically as long as I remove the / in front of the couple of topics it is

@SteveMacenski
Copy link
Member

#3803 implements + tested

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

Successfully merging a pull request may close this issue.

3 participants