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

How to change a parameter when roslaunching a package?

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

ROSNewbie gravatar image

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

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:

<launch>
<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"/>
</node>
</launch>

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
0

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

ROSNewbie gravatar image

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

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

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

2 followers

Stats

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

Seen: 124 times

Last updated: Mar 06 '22