Ask Your Question
1

custom Costmap2D Layer for Obstacles

asked 2017-10-30 08:21:20 -0500

Twista3579 gravatar image

updated 2017-10-30 08:42:49 -0500

Hi,

i would like to create a custom Layer for Obstacles.

In this Layer i will place obstacles on x, y coordinates. A custom Node with custom msg published the information (x, y).

Actually, i have create a class ObstacleLayer based on this tutorial:

[ http://wiki.ros.org/costmap_2d/Tutori... ]

My problem is that i don´t know how i can load the layer and include my obstacle informations from my custom msg.

The yaml file looks like this:

plugins: 
    - {name: ros_ips_obstacle_layer, type: "ros_ips_obstacle_layer::ObstacleLayer"}

publish_frequency: 1.0
robot_radius: 0.25

The Launch file looks like this:

<launch>
<node name="static_tf0" pkg="tf" type="static_transform_publisher" args="2 0 0 0 0 0 /map /base_link 100"/>

<rosparam file="$(find ros_ips_obstacle_layer)/settings/minimal.yaml" command="load" ns="/costmap_node/costmap" />

<node name="map_server" pkg="map_server" type="map_server" args="$(find ros_ips_obstacle_layer)/settings/buero.yaml"/>
</launch>

If i start move_base i see this:

parallels@ubuntu:~/ros/ips_ws/src/ros_ips_visualization/ros_ips_obstacle_layer/settings$ rosrun move_base move_base 


[ INFO] [1509370746.595757073]: Using plugin "obstacle_layer"
 [ INFO] [1509370746.653107474]:     Subscribed to Topics: 
[ INFO] [1509370746.673478850]: Using plugin "inflation_layer"
[ERROR] [1509370746.703346918]: You must specify at least three points for the robot footprint, reverting to previous footprint.
[ INFO] [1509370746.801166117]: Using plugin "obstacle_layer"
[ INFO] [1509370746.851950308]:     Subscribed to Topics: 
[ INFO] [1509370746.862105320]: Using plugin "inflation_layer"
[ERROR] [1509370746.895036942]: You must specify at least three points for the robot footprint, reverting to previous footprint.

Should not I see my layer there? or in rostopic list?

Thanks for help

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2019-08-22 18:32:57 -0500

mahir gravatar image

Are you sure your layer type is correct? I think the layer type should be "costmap_2d::ros_ips_obstacle_layer". So the final yaml should be something like this.

plugins: 
  - {name: ros_ips_obstacle_layer, type: "costmap_2d::ros_ips_obstacle_layer"}

publish_frequency: 1.0
robot_radius: 0.25
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

3 followers

Stats

Asked: 2017-10-30 08:21:20 -0500

Seen: 359 times

Last updated: Aug 22