Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rf2o doesn't work with amcl for localization #36

Open
hilmi-ica opened this issue Mar 10, 2023 · 2 comments
Open

rf2o doesn't work with amcl for localization #36

hilmi-ica opened this issue Mar 10, 2023 · 2 comments

Comments

@hilmi-ica
Copy link

Hi guys, i was trying to do a localization only using a Lidar (SICK NAV310). So i opted to integration of amcl and rf2o package. But the laser scan wont match with known map when the lidar was moving and the orientation seems inverted.
Whats-App-Image-2023-03-02-at-5-41-22-PM
Here is my launch file:

<launch>
      <node pkg="map_server" type="map_server" name="map_server" args="/home/hilmi/catkin/data/maps/lab_ica_1.yaml" />
      <node pkg="tf" type="static_transform_publisher" name="base_to_laser_broadcaster" args="0 0 0 0 0 0 base_link laser 100" />

      <node pkg="rf2o_laser_odometry" type="rf2o_laser_odometry_node" name="rf2o_laser_odometry" output="screen">
          <param name="laser_scan_topic" value="/sick_nav_3xx/scan" />
          <param name="odom_topic" value="/odom_rf2o" />
          <param name="publish_tf" value="true" />
          <param name="base_frame_id" value="base_link" />
          <param name="odom_frame_id" value="odom" />
          <param name="init_pose_from_topic" value="" />
          <param name="freq" value="8.0"/>
          <param name="verbose" value="true" />
      </node>

      <node pkg="amcl" type="amcl" name="amcl" output="screen">

          <param name="fixed_frame" value="map"/> -->
          <param name="use_map_topic " value="true"/>
          <param name="odom_frame_id" value="odom" />
          <param name="base_frame_id" value="base_link" />
          <param name="frame_id" value="laser" />
          <param name="tf_broadcast" value="true"/>
          <remap from="scan" to="/sick_nav_3xx/scan" />

          <!-- Publish scans from best pose at a max of 10 Hz -->
          <param name="odom_model_type" value="diff-corrected"/>
          <param name="odom_alpha5" value="0.1"/>
          <param name="gui_publish_rate" value="10.0"/>
          <param name="laser_max_beams" value="30"/>
          <param name="min_particles" value="500"/>
          <param name="max_particles" value="5000"/>
          <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.8"/>
          <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.2"/>
          <param name="update_min_a" value="0.5"/>
          <param name="odom_frame_id" value="odom"/>
          <param name="resample_interval" value="1"/>
          <param name="transform_tolerance" value="0.1"/>
          <param name="recovery_alpha_slow" value="0.0"/>
          <param name="recovery_alpha_fast" value="0.0"/>

       </node>
    </launch>

(sorry i'm new to github)

And here is my tf_tree and tf_node_graph:
Screenshot-from-2023-03-03-11-08-56-copy
Screenshot-from-2023-03-03-11-33-01

And the thing is when i try to use laser_scan_matcher for the odometry instead of rf2o by following this tutorial and some twekings, it works fine!

Hope anyone can help!
Thanks!

@fatemehprhm
Copy link

Hi, im facing the same issue
did you find any solution for this problem?

@simbolonmartin
Copy link

You must match the parameter odom topic in your rf2o node and the amcl node.
My suggestion is to change the value from /odom_rf2o to /odom.

<node pkg="rf2o_laser_odometry...>
..
<param name="odom_topic" value="/odom" />
..
</node>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants