ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Hi Omer,
What I understand from your question is that you want to launch two instances of robot_localization for two different robots by launching then under different name_spaces.
To launch the robot_localization node under a name_space you can use <group> tag or you can pass argument __ns (args="__ns=name_space"). After this your launch file would include:
<node ns="bot1" pkg="robot_localization" type="ekf_localization_node" name="ekf_localization">
<rosparam command="load" file="$(find jackal_control)/config/robot_localization_bot1.yaml" />
</node>
<node ns="bot2" pkg="robot_localization" type="ekf_localization_node" name="ekf_localization">
<rosparam command="load" file="$(find jackal_control)/config/robot_localization_bot2.yaml" />
</node>
after this you would need to modify your yaml files accordingly,
frequency: 50
odom0: /jackal_velocity_controller/odom #odom source for respective robot
odom0_config: [false, false, false,
false, false, false,
true, true, true,
false, false, true,
false, false, false]
odom0_differential: false
imu0: /imu/data #imu source for respective bot
imu0_config: [false, false, false,
true, true, true,
false, false, false,
true, true, true,
false, false, false]
imu0_differential: false
odom_frame: odom # fixed frame for robot (this can be same for both)
base_link_frame: base_link #fixed frame for robot (this should be diffenret for both)
world_frame: odom #again same is fine
make sure that you publish static transforms between IMU frame and baselink for both the robots
Hope this helps.