0
$\begingroup$

Rosanswers logo

This is my issue: When I launch costmap_node outside group tag all goes fine:

<launch>
   ... 
   <rosparam file="$(find vinter_utils)/launch/costmap_params.yaml" command="load" ns="costmap_node/costmap"/>
   <node name="costmap_node" type="costmap_2d_node" pkg="costmap_2d" output="screen">
      <remap from="/map" to="/intersection/map"/>
   </node>
  ...
</launch>

But when I want to launch the node within a group tag, the costmap is not published:

<launch>
   ... 
   <group ns="intersection">
      ...
      <rosparam file="$(find vinter_utils)/launch/costmap_params.yaml" command="load" ns="costmap_node/costmap"/>
      <node name="costmap_node" type="costmap_2d_node" pkg="costmap_2d" output="screen">
         <remap from="/map" to="/intersection/map"/>
      </node>
      ...
   </group>
  ...
</launch>

I guess is something related with naming but I can't figure out what is this.

This is the .yaml file:

global_frame: "/map"
robot_base_frame: "/intersection_0"
update_frequency: 5.0
publish_frequency: 5.0
obstacle_range: 10
raytrace_range: 15
  
inflation_radius: 0.05
robot_radius: 0.03 
  
observation_sources: "base_0 base_1 base_2 base_3"
  
#North East Base laser
base_0:
  topic: "/base_0/base_scan"
  data_type: "LaserScan"
  observation_persistence: 0.0
  clearing: true
  
#South East Base laser
base_1:
  topic: "base_1/base_scan"
  data_type: "LaserScan"
  observation_persistence: 0.0
  clearing: true
 
#South West Base laser
base_2:
  topic: "base_2/base_scan"
  data_type: "LaserScan"
  observation_persistence: 0.0
  clearing: true

#North West Base laser
base_3:
  topic: "base_3/base_scan"
  data_type: "LaserScan"
  observation_persistence: 0.0
  clearing: true
  
static_map: true
publish_voxel_map: true
track_unknown_space: true

Originally posted by gustavo.velascoh on ROS Answers with karma: 756 on 2014-02-08

Post score: 0


Original comments

Comment by David Lu on 2014-02-09:
What is the output of rosparam list?

Comment by gustavo.velascoh on 2014-02-09:
Hi David, I finally solve this. I was about to answer your question and launched both cases and they work well. Sorry, I don't know what happened before. One more question, Can you help me with this-> http://answers.ros.org/question/119051/local-costmap-empty-using-move_base_node/ :D

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I solve this moving rosparam tag within node tag and modifying ns:

<group ns="intersection">
...
<node name="costmap_node" type="costmap_2d_node" pkg="costmap_2d" output="screen">
    <rosparam file="$(find vinter_utils)/launch/costmap_params_rw.yaml" command="load" ns="costmap"/>
    <remap from="/map" to="/intersection/map"/>
</node>
...
</group>

EDIT: I launched the 2nd case on the question and it worked fine. That's was weird, so I think this was a dummy question :P


Originally posted by gustavo.velascoh with karma: 756 on 2014-02-09

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.