ros::service::waitForService with the topic /map

asked 2017-04-25 12:30:59 -0600

Lizi_proj gravatar image

Hi, I am trying to read map server with the command: ros::ServiceClient mapClient = nh.serviceClient<nav_msgs::getmap>("static_map"); and the topic /map is belong to another process and the topic that I want to read the map from is remap:

<arg name="map_file" default="$(find ses)/world/labs.yaml"/>
<node name="map_server" pkg="map_server" type="map_server" args="$(arg map_file)">
    <remap from="map" to="threat_map"/>
    <remap from="map_metadata" to="threat_map_metadata"/>
</node>

<node name="map_server_real" pkg="map_server" type="map_server" args="$(find ses)/world/lab_map.yaml"/>

in the launch lines that I added i would like to read the static_map from the "threat_map" and not from the ordinary "/map". My question is, if there is any way that I could read from another topic ("threat_map") the static map? Thank you all.

edit retag flag offensive close merge delete