Passing arguments from .launch file to .yaml file
Hello, I am having problems with passing an argument into a .yaml file.
The problem is this:
map_type: costmap
observation_sources: scan
scan: {sensor_frame: $(arg namespace)/base_scan, data_type: LaserScan, topic: $(arg namespace)/scan, marking: true, clearing: true}
I am passing the argument, "BotN" for N robots in the launch file, e.g:
<include file="$(find deploy)/launch/make_robot.launch" >
<arg name="model" value="burger"/>
<arg name="namespace" value="Bot1" />
<arg name="initial_pose_x" value="-2.5"/>
<arg name="initial_pose_y" value="4.0"/>
</include>
But I get an insanely long error that doesn't really outline the issue.
Writing this in the .yaml file works, but I need it to work for multiple robots
scan: {sensor_frame: Bot1/base_scan, data_type: LaserScan, topic: Bot1/scan, marking: true, clearing: true}
Any idea?
I think most people just create a separate yaml file for each robot. It's the quickest way, and the easiest to debug when things to wrong.