Change location of global costmap relative to map frame / cartographer mark prohibited area

asked 2019-07-16 03:28:40 -0600

goeldisandro gravatar image

updated 2019-07-16 03:43:15 -0600

Hi there

I am trying to implement outdoor navigation. When i do so i come to a point where the maps from Google Cartographer do not separate street and meadow good enough. Due to the fact that i want to stay on the street i came up with the idea of editing the map. I do not found a way to edit the .pbstream which is normally the Input for my navigation. To be able to edit a map i run the assets writer, which resulted in a nice map.pgm picture and a map.yaml file. This enables me to edit the map.pgm with normal tools like ImageMagick. Therefore i can draw meadow and other obstacles in this map.

My plan is it still to localize with Cartographer and send the location info over tf to the move_base node. The global_costmap should then initialize on the edited map published with map_server. With enabling the option clearing = false the painted area should stay restricted. to reach that only the /map topic from the map_server gets published is simply commented out cartographer_occupancy_grid_node. This works fine.

The problem is neither the overlapping from the published maps (submaps (black/white right bottom) represents cartographer map, /map (purple right bottom with transparency edited lines) represents the edited map from the map_server) as apparent under visualization of all maps. I simply solved this with changing

origin: [5.51, 8.09, 3.14159] in the map.yaml file...

The problem indeed is, that the global_costmap (purple/turquoise left top) does not adopt its origin an gets published at the [0.0, 0.0, 0.0 ] location. Is there a way to force the global_costmap also to get published at a distinct location (same as the map_server map in the /map frame)? Or do you got any other suggestions to mark the prohibited area with google cartographer?

Thanks in advance

map.yaml

image: /home/ba_slam/bagfiles/keller/keller_edit.pgm
resolution: 0.050000
origin: [5.51, 8.09, 3.14159]
#origin: [0.0, 0.0, 0.0]
negate: 0
occupied_thresh: 0.65
free_thresh: 0.196

autonomous_navigation_rp.launch

<launch>

<param name="/use_sim_time" value="true"/>


  <!-- Run the map server -->
  <arg name="map_file" default="/home/ba_slam/bagfiles/keller/keller.bag_map.yaml"/>
  <node name="map_server" pkg="map_server" type="map_server" args="$(arg map_file)" />
  <!-- <remap from="map" to="map_server_map"/>  -->



<!-- RPlidar starten #################################################################### -->

  <node name="rplidarNode"          pkg="rplidar_ros"  type="rplidarNode" output="screen">
  <param name="serial_port"         type="string" value="/dev/ttyUSB1"/>
  <param name="serial_baudrate"     type="int"    value="115200"/>
  <param name="frame_id"            type="string" value="rp_link"/>
  <param name="inverted"            type="bool"   value="false"/>
  <param name="angle_compensate"    type="bool"   value="true"/>
  </node> 



<!-- RVIZ starten #################################################################### -->
  <node name="rviz" pkg="rviz" type="rviz" args="-d $(find rplidar_ros)/rviz/rplidar.rviz" /> 




<!-- eigene tf_broadcaster/listener einbinden############################################## 

<node name="tf_broadcaster_base" pkg="robot_setup_tf" type="tf_broadcaster_base" /> 
-->

<!-- Turtlebot  bringup ################################################################## -->
<include file =  "$(find turtlebot_bringup)/launch/minimal.launch"/>


<!---Cartographer ######################   -->  

  <param ...
(more)
edit retag flag offensive close merge delete

Comments

I've upvoted your question so that you have enough karma to add your image directly to the question.

jayess gravatar image jayess  ( 2019-08-17 10:11:07 -0600 )edit