Why is a service call being blocked inside a program but can be made from command line?

asked 2015-11-03 18:17:55 -0500

ParitoshKelkar gravatar image

Hi,

I'll briefly explain what I am trying to accomplish and then Ill talk about the problem I a running into.

I have attempted to configure a custom costmap layer that is advertising a particular service SRV. When I try invoking this service from within my node it seems to be getting blocked. This is happening when I advertise a static_tf between the base link and map from my launch file. When I use costmap_2d without this transform in place, warnings are issued saying that the particular map -> base_link transformation is needed. This same SRV when invoked through rosservice call through command line responds as it should.

I am not able to figure out the connection between the static_tf and SRV if any.

I went through the tutorials for configuring layered costmaps but I didnt understand that completely.

Any help is much appreciated. (Also, this is my first time posting here, so any f/b w.r.t the structure of the question is welcomed)

This is my launch file:

<?xml version="1.0"?>
<launch>

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


   <node name="map_server" pkg="map_server" type="map_server" args="$(find custom_costmap)/maps/map_levine4th.yaml"/> 

   <node pkg="custom_costmap" type="set_region_cost" name="set_region_cost" output="screen">

   <rosparam file="$(find custom_costmap)/params/minimal.yaml" command="load"/>
   </node> 
</launch>

This is my minimal.yaml:

 my_costmap:
 # must match incoming static_map
 global_frame: 'map'
 resolution: 0.05
 robot_base_frame: 'base_link'
 plugins: 

    - {name: static_map,       type: "costmap_2d::StaticLayer"}
    - {name: simple_layer,     type: "custom_costmap::SimpleLayer"}   

 static:
    map_topic: /map
#    subscribe_to_updates: false

 simple_layer:
     map_topic: /map

 publish_frequency: 1.0
 footprint: [[-0.325, -0.325], [-0.325, 0.325], [0.325, 0.325], [0.46, 0.0], [0.325, -0.325]]
edit retag flag offensive close merge delete