Exercise 3.2 ROS navigation

where do i find this files in the workspace, I am not able to locate this in catkin_ws


and even when i am creating any package in catkin_ws and trying to launch any file made by me,its always throw error as no such file and package is there and all , whats the problem here going on?

Hello @ROSBUILD,

here is thes short answer:

Run this command to see the contents of that file:


cat /home/simulations/public_sim_ws/src/all/husky/husky/husky_navigation/launch/amcl.launch

Here is the long answer:

You can use the rospack find [package_name] command to get the the path to a package.
Thus, to get the path to the husky_navigation package you would type:

rospack find husky_navigation

This will show this path:

/home/simulations/public_sim_ws/src/all/husky/husky/husky_navigation

you can see the directories inside that package by typing:

ls /home/simulations/public_sim_ws/src/all/husky/husky/husky_navigation

as you can see there is a launch directory:

CHANGELOG.rst  CMakeLists.txt  config  launch  maps  package.xml

look at the files inside the launch directory (since we want to display the content of a launch file):

ls /home/simulations/public_sim_ws/src/all/husky/husky/husky_navigation/launch

You will see that this directory has the launch file that you are looking for (among other launch files):

amcl.launch         exploration_demo.launch  move_base.launch
amcl_demo.launch    gmapping.launch          move_base_demo.launch
exploration.launch  gmapping_demo.launch     move_base_mapless_demo.launch

Finally to see the contents of this amcl launch file use the cat command, providing the path to the file like this:

cat /home/simulations/public_sim_ws/src/all/husky/husky/husky_navigation/launch/amcl.launch

For completeness, below a (shorter version of) the content of that launch file:

<?xml version="1.0"?>
<launch>

  <arg name="use_map_topic" default="true"/>
  <arg name="scan_topic" default="scan" />

  <node pkg="amcl" type="amcl" name="amcl">
    <param name="use_map_topic" value="$(arg use_map_topic)"/>
    <!-- Publish scans from best pose at a max of 10 Hz -->
    <param name="odom_model_type" value="diff"/>
    <param name="odom_alpha5" value="0.1"/>
    <param name="gui_publish_rate" value="10.0"/>
    <param name="laser_max_beams" value="60"/>
    <param name="laser_max_range" value="12.0"/>
    <param name="min_particles" value="500"/>
    <param name="max_particles" value="2000"/>
    <param name="kld_err" value="0.05"/>
    <param name="kld_z" value="0.99"/>
    <param name="odom_alpha1" value="0.2"/>
    <param name="odom_alpha2" value="0.2"/>
    <!-- translation std dev, m -->
    <param name="odom_alpha3" value="0.2"/>
    <param name="odom_alpha4" value="0.2"/>
    <param name="laser_z_hit" value="0.5"/>
    <param name="laser_z_short" value="0.05"/>
    <param name="laser_z_max" value="0.05"/>
    <param name="laser_z_rand" value="0.5"/>
    <param name="laser_sigma_hit" value="0.2"/>
    <param name="laser_lambda_short" value="0.1"/>
    <param name="laser_model_type" value="likelihood_field"/>
    <!-- <param name="laser_model_type" value="beam"/> -->
    <param name="laser_likelihood_max_dist" value="2.0"/>
    <param name="update_min_d" value="0.25"/>
    <param name="update_min_a" value="0.2"/>
    <param name="odom_frame_id" value="odom"/>
    <param name="resample_interval" value="1"/>
    <!-- Increase tolerance because the computer can get quite busy -->
    <param name="transform_tolerance" value="1.0"/>
    <param name="recovery_alpha_slow" value="0.0"/>
    <param name="recovery_alpha_fast" value="0.0"/>
    <remap from="scan" to="$(arg scan_topic)"/>
  </node>

</launch>

Hope this helps,

Roberto