The move_base can't connect to /map and /odom in a rapp

asked 2014-05-11 04:41:48 -0600

scopus gravatar image

updated 2014-05-13 20:23:48 -0600

we want to implement a server where the pose of multiple real turtlebots are shown in an interface based on rviz. We found multinav_concert in the ROCON of Hydro is a good case, and want to get our achievement based on this package.

After combining the softbot_nav_client.launch with amcl_demo.launch, i.e. creat a rapp with amcl and move_base for a real turtlebot, I found that although the amcl node was successfull launched, the move_base node was seriously pruned comparing to running amcl_demo.launch(containing move_base node) separately. I believe this is the reason why the error information ""waiting on transform from base_footpirnt to map to become available before running costmap, tf error." comes out.

By running rosnode info /softbot/move_base:

(You can compare the following infomation with the one from running amcl_demo.launch separately, in which the node is /move_base. The info of node /move_base is not listed here because it is so long. As an example, the "subscriptions" is not only three items as /softbot/move_base has.)

turtlebot@turtlebot-wec: rosnode info /softbot/move_base

Node [/softbot/move_base]
Publications: 
 * /softbot/move_base/current_goal [geometry_msgs/PoseStamped]
 * /softbot/navigation_velocity_smoother/raw_cmd_vel [geometry_msgs/Twist]
 * /rosout [rosgraph_msgs/Log]
 * /softbot/move_base/goal [move_base_msgs/MoveBaseActionGoal]

Subscriptions: 
 * /tf [tf2_msgs/TFMessage]
 * /tf_static [unknown type]
 * /softbot/goal_simple [unknown type]

Services: 
 * /softbot/move_base/get_loggers
 * /softbot/move_base/set_logger_level


contacting node http://turtlebot-wec:46491/ ...
Pid: 2846
Connections:
 * topic: /rosout
    * to: /rosout
    * direction: outbound
    * transport: TCPROS
 * topic: /softbot/navigation_velocity_smoother/raw_cmd_vel
    * to: /mobile_base_nodelet_manager
    * direction: outbound
    * transport: TCPROS
 * topic: /tf
    * to: /robot_state_publisher (http://turtlebot-wec:40563/)
    * direction: inbound
    * transport: TCPROS
 * topic: /tf
    * to: /mobile_base_nodelet_manager (http://turtlebot-wec:49022/)
    * direction: inbound
    * transport: TCPROS
 * topic: /tf
    * to: /softbot/amcl (http://turtlebot-wec:54342/)
    * direction: inbound
    * transport: TCPROS

I didn't know how to solve this problem. The instruction of rapp in ROS wiki doesn't say anything about this.

Besides the interface of the rapp is:

subscribers: 
  - move_base_simple/goal
  - initialpose
publishers: 
  - map
  - map_metadata
  - robot_pose
  - amcl_pose
services: []
action_clients: []
action_servers:
  - move_base

You can see that the action_servers already includes move_base.

I found that It is because the /softbot/move_base can't connect to topic /map and /odom. I have tried to solve it by modifying move_base.launch.xml file by adding " remap from="map" to=“/map". But it doesn't work.

So What is the matter? Any advices would be appreciated.

edit retag flag offensive close merge delete

Comments

I assume you are running system with multiple computers. Please make sure the nodes between two computers are communicating properly. A simple test is using talker and listener in a single master and see if they are talking.

jihoonl gravatar image jihoonl  ( 2014-05-18 13:35:16 -0600 )edit

Thank you for you reply. I do run system with mutiple computers. A computer works as a server. Other two computers control real turtlebots. So there are several computers( i.e. several muster) are communicating by using the gateway modle of ROCON. Since it is a multiple master system, I can't understand why I should do the test using talker and listener in a single master.

scopus gravatar image scopus  ( 2014-05-18 16:56:24 -0600 )edit

It is not a matter of single or multi master. It is to see whether nodes are exchanging data properly since it is still a ros system.

jihoonl gravatar image jihoonl  ( 2014-05-18 21:33:16 -0600 )edit

Also please introspect topic connections using rostopic list and rostopic on each of the system. Especially, you should be able to see all the public interface topics on main workspace.

jihoonl gravatar image jihoonl  ( 2014-05-18 21:35:11 -0600 )edit

Thank you! I assume that you asked me to do test by using chatter_concert in the hydro version of ROCON. It uses the rocon.rapps. I have run it by commanding " rocon_launch chatter_concert chatter.concert" in a computer. It launched autonomouly several terminals. Each of them running a talker or a listener. It works fine.

scopus gravatar image scopus  ( 2014-05-19 15:37:28 -0600 )edit

I didn't mean to test with chatter_concert. I meant you should test communication between two physically separated computers and see if they are still working in the same ros_master_uri. Assuming you have set launch file properly, there are only two reason it does not work.

jihoonl gravatar image jihoonl  ( 2014-05-21 16:06:06 -0600 )edit

Either ROS_HOSTNAME and ros_master_uri are not set properly or remapping rule is not matching.. Talker and listener testing will validate that you have a correct network setting.

jihoonl gravatar image jihoonl  ( 2014-05-21 16:06:54 -0600 )edit

Thank you very much for your help. As your advices, I set the network between two computers by this link: http://wiki.ros.org/turtlebot/Tutorials/hydro/Network%20Configuration. Then by using the example "001_talker_listener" in the package rospy_tutorials, I input " rosrun rospy_tutorials talker" in a computer, then input "rosrun rospy_tutorials listener" in another computer. The shown result is same with the one in link http://wiki.ros.org/ROS/Tutorials/ExaminingPublisherSubscriber. I think the network setting is fine.

scopus gravatar image scopus  ( 2014-05-22 18:12:44 -0600 )edit