What I am trying to do is to install two turtlebots in GAZEBO in reference to this famous
[post](https://answers.ros.org/question/41433/multiple-robots-simulation-and-navigation/) and try to cover willow garage with them.
I managed to get AMCL running for both robots just fine. Now I need to set move base but I want obviously to set all the costmaps running for the namespace of each robot. So According to the code bellow I set the tf prefixes (robo1_tf/ , robot2_tf).
So what I have is one name space here and a tf_prefix:
and one part of the common costmap.yaml file of move base is below
observation_sources: laser_scan_sensor
laser_scan_sensor: {sensor_frame: base_link, data_type: LaserScan, topic: scan, marking: true, clearing: true, expected_update_rate: 15.0}
so What I wanna do, instead of creating two seperate costmap files going along the line
common_costmap_params1.yaml
observation_sources: laser_scan_sensor
laser_scan_sensor: {sensor_frame: robot1_tf/base_link, data_type: LaserScan, topic: robot1/scan, marking: true, clearing: true, expected_update_rate: 15.0}
common_costmap_params2.yaml
observation_sources: laser_scan_sensor
laser_scan_sensor: {sensor_frame: robot2_tf/base_link, data_type: LaserScan, topic: robot2/scan, marking: true, clearing: true, expected_update_rate: 15.0}
I want to keep ONE common_costmap_params.yaml for BOTH namespaces like
observation_sources: laser_scan_sensor
laser_scan_sensor: {sensor_frame: $(tf_prefix)/base_link, data_type: LaserScan, topic: $(ns)/scan, marking: true,
clearing: true, expected_update_rate: 15.0}
if it was python code I Would do
`prefix = rospy.get_param("tf_prefix")`
But How do I do the above python trick in a yaml file?
I do have read the [Param Server](http://wiki.ros.org/Parameter%20Server) docs but there sth I cannot gasp
something in the Syntax I do not know. I thought that move_base would work out of the box for each ns but this does not seem to be the case
If you need any list of topics, nodes, tf_tree, node graph, let me know and I will update.
If the question is not well stated I will update also.
thanks for any direction or hint or link in advance.
↧