ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

How to change a parameter when roslaunching a package?

asked 2022-03-06 12:29:47 -0600

ROSNewbie gravatar image

updated 2022-03-06 13:08:55 -0600

Good day, I need to change the topic parameter the package explore_lite subscribes to for the costmap, however no matter what I try, it is not working. I am using roslaunch in the terminal.

A minor detail is that the wiki page explore_lite under section 4.1.2 said this parameter is costmap, however when I run the node the parameter list shows up as costmap_topic.

I tried remapping both these names and other combinations with the node's name like this: roslaunch explore_lite explore.launch /costmap:=/rtabmap/grid_map but none worked. I even tried many combinations with and without quotes and slashes.

Is this because its a parameter and not an argument? I found the launch file inside the /opt/ros/melodic/share folder that this command is calling and here is what it looks like:

<node pkg="explore_lite" type="explore" respawn="false" name="explore" output="screen">
  <param name="robot_base_frame" value="base_link"/>
  <param name="costmap_topic" value="map"/>
  <param name="costmap_updates_topic" value="map_updates"/>
  <param name="visualize" value="true"/>
  <param name="planner_frequency" value="0.33"/>
  <param name="progress_timeout" value="30.0"/>
  <param name="potential_scale" value="3.0"/>
  <param name="orientation_scale" value="0.0"/>
  <param name="gain_scale" value="1.0"/>
  <param name="transform_tolerance" value="0.3"/>
  <param name="min_frontier_size" value="0.75"/>

How do I change costmap_topic from map to something else?? Thank you.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2022-03-06 14:00:53 -0600

ROSNewbie gravatar image

I solved it by creating my own launch file and calling the original launch file and setting the parameter there:

    <include file="$(find explore_lite)/launch/explore.launch" />
    <param name="/explore/costmap_topic" value="/rtabmap/grid_map" />

This wiki entry under part 6. Parameter overrides gave it in the format I understood and worked.

edit flag offensive delete link more

Question Tools



Asked: 2022-03-06 12:29:47 -0600

Seen: 114 times

Last updated: Mar 06 '22