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 robot name and type args in app_manager #54

Open
wants to merge 4 commits into
base: kinetic-devel
Choose a base branch
from

Conversation

knorth55
Copy link
Contributor

add robot name and type args in app_manager.launch
add node_name args in app_manager.launch

Copy link
Contributor

@k-okada k-okada left a comment

Choose a reason for hiding this comment

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

As an author of https://github.com/ros-infrastructure/rep/pull/104/files, I think every robot_startup should set robot/name, not set by each app_manager.

@knorth55
Copy link
Contributor Author

knorth55 commented Jul 29, 2022

this PR is for launching multiple app_managers under one ROS core.
When we run app_manager in PR1040, the topic name is determined as /pr1040.
But we want to run app_manager in our local PC, too.
So I want to control the namespace by roslaunch argument.

@k-okada
Copy link
Contributor

k-okada commented Aug 1, 2022

I see, how about using remapping ?

app_manager /robot/name:=/a/robot/name

@knorth55
Copy link
Contributor Author

knorth55 commented Aug 1, 2022

it works with following command.

rosrun app_manager app_manager _/robot/name:=hoge

However when we use param tag to remap it, it will be used as private param like /app_manager/robot/type.
param tag cannot set global parameters in node.
http://wiki.ros.org/roslaunch/XML/param

  <node pkg="app_manager" type="app_manager" name="$(arg manager_node_name)"
        args="$(arg applist_args)"
        output="screen" respawn="$(arg respawn)">
    <param name="/robot/name" value="$(arg robot_name)" if="$(arg use_robot_name)" />
    <param name="/robot/type" value="$(arg robot_type)" if="$(arg use_robot_type)" />
    <rosparam subst_value="true">
      interface_master: http://$(arg master_address):$(arg master_port)
      enable_app_replacement: $(arg enable_app_replacement)
      enable_topic_remapping: $(arg enable_topic_remapping)
      sigint_timeout: $(arg sigint_timeout)
      sigterm_timeout: $(arg sigterm_timeout)
    </rosparam>
  </node>

We all cannot use remap tag, too.

  <node pkg="app_manager" type="app_manager" name="$(arg manager_node_name)"
        args="$(arg applist_args)"
        output="screen" respawn="$(arg respawn)">
    <remap from="/robot/name" to="$(arg robot_name)" if="$(arg use_robot_name)" />
    <remap from="/robot/type" to="$(arg robot_type)" if="$(arg use_robot_type)" />
    <rosparam subst_value="true">
      interface_master: http://$(arg master_address):$(arg master_port)
      enable_app_replacement: $(arg enable_app_replacement)
      enable_topic_remapping: $(arg enable_topic_remapping)
      sigint_timeout: $(arg sigint_timeout)
      sigterm_timeout: $(arg sigterm_timeout)
    </rosparam>
  </node>

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