The move_base can't connect to /map and /odom in a rapp(2) [closed]

asked 2014-05-25 18:14:47 -0600

scopus gravatar image

This question is after the question that I have submited in here. Now I will state some new findings for the question " Why the move_base can't connect to /map and /odom in a rapp" when I am want to control real turtlebots base on the project multinav_concert in rocon .

Firstly, since a rapp is started by responding to a request as the mechanisms of ‘Service’ in ROS. I found a way to test if a rapp is working as expected after being launched succesfully. That is : I directly input command

roslaunch multinav_concert soft_navbot_client.launch

in a termianl, then in another terminal input "

rosservice call /softbot/start_app "name: 'multinav_concert/nav_demo' 
remappings:
- remap_from: '/amcl_pose'  
  remap_to: '/softbot/amcl_pose'"

By this way, the rapp nav_demo worked as expected. The original rapp nav_demo is based on fake localization. However, when it comes to real localization, that is using amcl node and move_base node, as I stated before, the move_base still can't connected to topic /map which causes many subsequent problems such as empty topic /amcl_pose.

<launch>
      <include file="$(find turtlebot_navigation)/launch/amcl_infocenter.launch"/>  
     <node pkg="robot_pose_publisher" name="robot_pose_publisher" type="robot_pose_publisher">  
          <rosparam>
          is_stamped: true
          base_frame: base_footprint
         </rosparam>
     </node>
</launch>

Above is the launch file "nav_test.launch" wrapped in a rapp. This file is originated from nav_demo.launch, where the amcl_infocenter.launch is as follows.

<launch>
  <include file="$(find turtlebot_bringup)/launch/3dsensor.launch">
    <arg name="rgb_processing" value="false" />
    <arg name="depth_registration" value="false" />
    <arg name="depth_processing" value="false" />

    <!-- We must specify an absolute topic name because if not it will be prefixed by "$(arg camera)".
         Probably is a bug in the nodelet manager: https://github.com/ros/nodelet_core/issues/7 --> 
    <arg name="scan_topic" value="/scan" />
  </include>

  <!-- Map server -->
  <arg name="map_file" default="$(find turtlebot_navigation)/maps/infocenter_map.yaml"/>
  <node name="map_server" pkg="map_server" type="map_server" args="$(arg map_file)" />

  <arg name="initial_pose_x" default="0.0"/> <!-- Use 17.0 for willow's map in simulation -->
  <arg name="initial_pose_y" default="0.0"/> <!-- Use 17.0 for willow's map in simulation -->
  <arg name="initial_pose_a" default="0.0"/>
  <include file="$(find turtlebot_navigation)/launch/includes/amcl.launch.xml">
    <arg name="initial_pose_x" value="$(arg initial_pose_x)"/>
    <arg name="initial_pose_y" value="$(arg initial_pose_y)"/>
    <arg name="initial_pose_a" value="$(arg initial_pose_a)"/>
    <arg name="use_map_topic" value ="true"/>
  </include>

  <include file="$(find turtlebot_navigation)/launch/includes/move_base.launch.xml">
    <arg name="odom_topic" value ="/odom" />
  </include>

</launch>

I also tried to launch map individually beforehand, then input roslaunch multinav_concert soft_navbot_client.launch in a terminal, and

rosservice call /softbot/start_app "name: 'multinav_concert/nav_test' 
remappings:
- remap_from: '/amcl_pose'  
  remap_to: '/softbot/amcl_pose'"

in another teriminal. The problem still exists(of couse, I commented the map node in amcl_infocenter. launch beforehand)

Looking forword to great advice.

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by Procópio
close date 2017-06-26 02:09:58.541043

Comments

I am running in to the same problem using multimaster-fkie. When I launch move-base in a namespace, it does not connect to the odom and map topics.

Did you find a fix for it? If so, would you please share your fix?

BasJ93 gravatar imageBasJ93 ( 2017-05-31 06:31:48 -0600 )edit

sorry, It has been long time since I publish this problem. I have forgot the process of this problem.

scopus gravatar imagescopus ( 2017-06-22 01:59:34 -0600 )edit