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

[WIP] Allow multi-robot simulation #92

Closed
wants to merge 9 commits into from

Conversation

ipa-srd-fg
Copy link
Contributor

  • new argument: robot_id
  • clean up launch files
  • two robots exemplar launch file

<arg name="robot_id" value="$(arg robot_id_2)" />
</include>

</launch>
Copy link
Member

Choose a reason for hiding this comment

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

I think we should remove this file

@fmessmer
Copy link
Member

Beside the removal of the two_robot.launch file, this PR looks good.
I like the split/provition of cob_gazebo_worlds/world.launch!

However, this PR should only be merged with all the other multi-robot-related PRs...and after more testing!

<!-- push robot_description to factory and spawn robot in gazebo -->
<node name="spawn_gazebo_model" pkg="gazebo_ros" type="spawn_model" args="-urdf -param robot_description -model robot -z 0.1 $(arg initial_config)" respawn="false" output="screen" />
<!-- push robot_description to factory and spawn robot in gazebo -->
<node name="spawn_gazebo_model" pkg="gazebo_ros" type="spawn_model" args="-urdf -param robot_description -model model_$(arg robot_id) -z 0.1 $(arg initial_config)" respawn="false" output="screen" />
Copy link
Member

Choose a reason for hiding this comment

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

this -model model_$(arg robot_id) gives you a strange model name for single robot simulation => model_/

gazebo_model_name

maybe we could at least use -model model_$(arg robot_id)_$(arg robot)
although my prefered model name would be model_raw32 for single robot and model_robot1_raw32 for dual robot....any idea how we could get rid of the / slashes?

Update:
What hinders us to use <arg name="robot_id" default="robot"/> instead of <arg name="robot_id" default="/"/> once we figured out how the multi-robot support works, i.e. how to handle robot_id namespacing correctly? Whith this we would not have the hardcoded /...

Also this would allow to later decide to spawn a second robot with robot_id:=robot2, although you started the first robot without giving a robot_id....

gazebo_model_name_multi

Copy link
Member

Choose a reason for hiding this comment

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

This commit is proposed in ipa-srd-fg#1

@fmessmer
Copy link
Member

Do not merge!
See this conclusion

@fmessmer
Copy link
Member

@ipa-srd-fg
Although not really required for single robot setups, I like the change proposed in this PR, i.e. provide a stand alone world.launch....I'll create a new PR superseding this one removing robot_id...

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.

None yet

2 participants