Skip to content

Conversation

@doisyg
Copy link

@doisyg doisyg commented Dec 26, 2019

Taking inspiration from #38 and #41, this PR enables 2 things:

  • Renaming all tf frames : odom, base_link, base_footprint, laser(s) and camera(s).
  • Disabling the publication of the TF transforms of the sensors with per sensor control.

This is done through parameters and array of parameters. Default (old) behavior should be ensured in case the parameters are not set. Below an example launch file:

<launch>
  <param name="use_sim_time" value="true"/>
  <node pkg="stage_ros" type="stageros" name="stageros" args="/tmp/stage_world.world">

  <param name="odom_frame_id" value="odom"/>
  <param name="base_link_frame_id" value="base_link"/>
  <param name="base_footprint_frame_id" value="base_footprint"/>

  <rosparam param="laser_frame_ids">['front_laser_link', 'back_laser_link']</rosparam>
  <rosparam param="camera_frame_ids">['camera_bottom_front_link', 'camera_top_front_link']</rosparam>

  <rosparam param="publish_laser_tfs">[false, true]</rosparam>
  <rosparam param="publish_camera_tfs">[true, false]</rosparam>


  <!-- sensor topics remaping -->
  <remap from="base_scan_0" to="scan_front"/>
  <remap from="base_scan_1" to="scan_back"/>

  <remap from="image_0" to="camera_bottom_front/image_raw"/>
  <remap from="camera_info_0" to="camera_bottom_front/camera_info"/>

  <remap from="image_1" to="camera_top_front_link/image_raw"/>
  <remap from="camera_info_1" to="camera_top_front_link/camera_info"/>
  </node>
</launch>

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