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] Port gazebo launch scripts to ROS2 #962

Merged
merged 3 commits into from Aug 14, 2019

Conversation

@shiveshkhaitan
Copy link

commented Jul 19, 2019

Port gazebo, gzserver and gzclient scripts from ROS1 to launch files in ROS2.

Example usage:
ros2 launch gazebo_ros gazebo.launch.py verbose:=true pause:=true Timer:=true

ros2 launch gazebo_ros gzserver.launch.py verbose:=true pause:=true

ros2 launch gazebo_ros gzclient.launch.py verbose:=true Timer:=true

This depends on #925

@chapulina chapulina added the ros2 label Jul 24, 2019

@chapulina

This comment has been minimized.

Copy link
Contributor

commented Jul 24, 2019

@osrf-jenkins run tests please

@chapulina chapulina force-pushed the shiveshkhaitan:launch_scripts branch from 0e1e429 to d7c6950 Aug 11, 2019

@chapulina
Copy link
Contributor

left a comment

#925 is merged and backported to dashing. I rebased this branch so it can use GazeboRosPaths.

It's working for me, I just have some suggestions. We also need a migration guide.

DeclareLaunchArgument('Cessna', default_value='false',
description='Set "true" to start gzclient with Cessna GUI plugin'),
DeclareLaunchArgument('Keyboard', default_value='false',
description='Set "true" to start gzclient with Keyboard GUI plugin'),

This comment has been minimized.

Copy link
@chapulina

chapulina Aug 11, 2019

Contributor

Instead of exposing these 3 GUI plugins as boolean options, it would be more flexible to let the user pass the full plugin name as a string. This way, they can also choose custom plugins. What do you think?

This comment has been minimized.

Copy link
@shiveshkhaitan

shiveshkhaitan Aug 11, 2019

Author

The problem is that one argument only takes one value. Users cannot assign a list of plugins to an argument

This comment has been minimized.

Copy link
@chapulina

chapulina Aug 13, 2019

Contributor

Together with @sloretz, we found out about the shell=True option, which lets us pass the whole command as a single string. Using that, I have some suggestions on 5721646 .

The last thing I'd like to add would be gui and server arguments to gazebo.launch.py so that users can conditionally include gzclient and gzserver, i.e.:

ros2 launch gazebo_ros gazebo.launch.py gui:=false

I found documentation implying that IncludeLaunchDescription can be conditionally included but I didn't figure out exactly how.

This comment has been minimized.

Copy link
@chapulina

chapulina Aug 13, 2019

Contributor

It turns out conditional includes are not possible yet: ros2/launch#303. We could add a note to the code pointing to that issue.

This PR looks good to me once the changes to use shell=True are in.

gazebo_ros/launch/gzserver.launch.py Outdated Show resolved Hide resolved
gazebo_ros/launch/gzclient.launch.py Show resolved Hide resolved
gazebo_ros/launch/gzserver.launch.py Outdated Show resolved Hide resolved
chapulina added a commit that referenced this pull request Aug 13, 2019
suggestions to #962
Signed-off-by: Louise Poubel <louise@openrobotics.org>
@chapulina chapulina referenced this pull request Aug 13, 2019
@chapulina
Copy link
Contributor

left a comment

Merging! We just need a migration guide

@chapulina chapulina merged commit bf0ba60 into ros-simulation:dashing Aug 14, 2019

0 of 2 checks passed

Dpr__gazebo_ros_pkgs__ubuntu_bionic_amd64 Build finished.
Details
ros2_gazebo_pkgs-ci-pr_any_dashing-bionic-amd64 Build finished.
Details
shiveshkhaitan added a commit to shiveshkhaitan/gazebo_ros_pkgs that referenced this pull request Aug 15, 2019
[ros2] Port gazebo launch scripts to ROS2 (ros-simulation#962)
* [ros2] Port gazebo launch scripts to ROS2

* Add gdb and valgrind option

* Use shell command for extra gazebo args
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.