Closed mzaiady closed 7 years ago
I used the following workaround until turtlebot_gazebo get updates, by updating the
/opt/ros/indigo/share/turtlebot_gazebo/launch/amcl_demo.launch
To the following (same logic included in the updated turtlebot_navigation/launch/amcl_demo.launch ),
<launch>
<!-- Map server -->
<arg name="map_file" default="$(env TURTLEBOT_GAZEBO_MAP_FILE)"/>
<arg name="3d_sensor" default="$(env TURTLEBOT_3D_SENSOR)"/> <!-- r200, kinect, asus_xtion_pro -->
<node name="map_server" pkg="map_server" type="map_server" args="$(arg map_file)" />
<!-- Localization -->
<arg name="initial_pose_x" default="0.0"/>
<arg name="initial_pose_y" default="0.0"/>
<arg name="initial_pose_a" default="0.0"/>
<arg name="custom_amcl_launch_file" default="$(find turtlebot_navigation)/launch/includes/amcl/$(arg 3d_sensor)_amcl.launch.xml"/>
<include file="$(arg custom_amcl_launch_file)">
<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)"/>
</include>
<!-- Move base -->
<arg name="custom_param_file" default="$(find turtlebot_navigation)/param/$(arg 3d_sensor)_costmap_params.yaml"/>*
<include file="$(find turtlebot_navigation)/launch/includes/move_base.launch.xml">
<arg name="custom_param_file" value="$(arg custom_param_file)"/>
</include>
</launch>
Replaced
<include file="$(find turtlebot_navigation)/launch/includes/amcl.launch.xml">
With:
<arg name="3d_sensor" default="$(env TURTLEBOT_3D_SENSOR)"/>
<arg name="custom_amcl_launch_file" default="$(find turtlebot_navigation)/launch/includes/amcl/$(arg 3d_sensor)_amcl.launch.xml"/>
<include file="$(arg custom_amcl_launch_file)">
also added
<arg name="custom_param_file" default="$(find turtlebot_navigation)/param/$(arg 3d_sensor)_costmap_params.yaml"/>*
<arg name="custom_param_file" value="$(arg custom_param_file)"/>
The issue also exist if you creating a new map, so to make my answer complete, also gmapping-demo.launch need to be updated:
sudo gedit /opt/ros/indigo/share/turtlebot_gazebo/launch/gmapping_demo.launch
and replace the content with :
<launch>
<arg name="3d_sensor" default="$(env TURTLEBOT_3D_SENSOR)"/> <!-- r200, kinect, asus_xtion_pro -->
<arg name="custom_gmapping_launch_file" default="$(find turtlebot_navigation)/launch/includes/gmapping/$(arg 3d_sensor)_gmapping.launch.xml"/>
<include file="$(arg custom_gmapping_launch_file)"/>
</launch>
Good catch -- yes, the turtlebot_gazebo launch files should be updated to point to the right location. Apologies for this oversight. If you've made the changes, can you submit them as a pull request?
I submitted one, 10 minutes ago.
This can be closed, @mzaiady 's PR was merged.
Thanks for tracking some of these @rohbotics
Yeah, @rohbotics has been on a roll today. Thanks for testing so many of these issues and pull requests!
Thanks! :blush: I am interning at OSRF for my holiday break this week, so I started by going through pending PRs for turtlebot things.
I'm getting the following error
While running command
roslaunch turtlebot_gazebo amcl_demo.launch
The amcl_demo.launch contains
<include file="$(find turtlebot_navigation)/launch/includes/amcl.launch.xml">
While file locations changed in turtlebot_navigation:
...avigation/launch/includes/amcl.launch.xml → ...tion/launch/includes/amcl/amcl.launch.xml