Skip to content

avt_341_map_publisher_node

Chris Goodin edited this page Nov 19, 2021 · 1 revision

Map Publisher Node

In some cases, a user may want to eliminate the perception module altogether and create virtual obstacles for the vehicle to navigate around. In this case, the map publisher node can be used to "spoof" the perception output without actually requiring the sensor data.

The desired obstacles are loaded from a yaml file which must be specified in the launch file. For example

<rosparam file="$(find avt_341)/config/map_obstacles.yaml" />

Th example yaml file (in avt_341/config/map_obstalces.yaml) lists the x and y position of each obstacle, along with the radius. Only circular obstacles are enabled.

obstacles_x: [ 0.0, 10.0, 10.0  ]
obstacles_y: [ 0.0, 10.0, -10.0 ]
obstacles_r: [1.0, 2.0, 0.5]

To launch the map publisher node, the dimensions and resolution of the desired grid must still be specified.

  <node name="perception_spoof_node" pkg="avt_341" type="avt_341_map_publisher_node" required="true" output="screen">
    <param name="grid_height" value="120.0" />
    <param name="grid_width" value="120.0" />
    <param name="grid_llx" value="-60.0" />
    <param name="grid_lly" value="-60.0" />
    <param name="grid_res" value="0.25" />
    <param name="display" value="$(arg display)" />
  </node>

Note that a separate perception node SHOULD NOT be launched when using the map publisher node.

Subuscribed Topics

The map publisher node does not subscribe to any topics.

Published Topics

Parameters

  • ~grid_width (double, default: 500.0) The spatial extent of the map in the x/east direction, in meters.
  • ~grid_height (double, default: 500.0) The spatial extent of the map in the y/north direction, in meters.
  • ~grid_llx (double, default: -250.0) The ENU coordinate of the lower-left corner of the grid in the x/east direction, in meters.
  • ~grid_lly (double, default: -250.0) The ENU coordinate of the lower-left corner of the grid in the y/north direction, in meters.
  • ~grid_res (double, default: 1.0) The size of a grid cell, in meters.

Clone this wiki locally