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

Add "output" option to launch #20

Open
wants to merge 1 commit into
base: melodic-devel
Choose a base branch
from

Conversation

Tiryoh
Copy link

@Tiryoh Tiryoh commented Mar 28, 2022

This PR adds and "output" option to timed_roslaunch.launch.

@achille-martin
Copy link

achille-martin commented Oct 17, 2022

This PR is nice and useful.

However, there seems to be a way to add "output" arg when passing arguments to the next launch file: http://wiki.ros.org/timed_roslaunch

Instead of using the format <include file="$(find timed_roslaunch)/launch/timed_roslaunch.launch"></include>
It is recommended to use the format <node pkg="timed_roslaunch" type="timed_roslaunch.sh" args="" name="timed_roslaunch" output="screen" />

The outcome is the same, except that this time, output can be specified.

This is probably why the PR has not been merged yet.
Although it would be consistent to add "output" arg availability to the first format (the <include> one).

@Tiryoh
Copy link
Author

Tiryoh commented Oct 24, 2022

Hi @achille-martin, thanks for your comment.

I agree with you that almost the same functionality as this PR has already been implemented.
However, this PR adds changes that make it more convenient when we use timed_roslaunch with output="screen" option.

For example, in order to rewrite only a specific argument using if/unless, we can implemented as follows.

<launch>
  <node pkg="timed_roslaunch" type="timed_roslaunch.sh" args="2 turtlebot_navigation amcl_demo.launch initial_pose_x:=0.0 initial_pose_y:=0.0" name="timed_roslaunch" output="screen" if="$(arg foo)" />
  <node pkg="timed_roslaunch" type="timed_roslaunch.sh" args="2 turtlebot_navigation amcl_demo.launch initial_pose_x:=17.0 initial_pose_y:=17.0" name="timed_roslaunch" output="screen" unless="$(arg foo)" />
</launch>

If we apply this PR, we will be able to implement it more simply.

<launch>
  <include file="$(find timed_roslaunch)/launch/timed_roslaunch.launch">
    <arg name="time" value="2" />
    <arg name="pkg" value="turtlebot_navigation" />
    <arg name="file" value="amcl_demo.launch" />
    <arg name="value" value="initial_pose_x:=0.0 initial_pose_y:=0.0" if="$(arg foo)" />
    <arg name="value" value="initial_pose_x:=17.0 initial_pose_y:=17.0" unless="$(arg foo)" />
    <arg name="node_name" value="timed_roslaunch" />
    <arg name="output" value="true" />
  </include>
</launch>

@achille-martin
Copy link

Hi @Tiryoh,

Thanks for the details on specific use cases, I would agree with you on the feature.

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.

2 participants