Ask Your Question
1

use odom_combined in robot_localazation

asked 2020-12-01 04:05:00 -0500

johnson_em gravatar image

updated 2020-12-01 20:48:54 -0500

[picture A]

image descriptionPlease Click https://photos.app.goo.gl/2CGtfb9PqSj...

[picture B]

image descriptionPlease Click https://photos.app.goo.gl/takSsKQp5PB...

Hi guys, I am trying to migrate from robot_pose_ekf to robot_localazation. picture B is on robot_pose_ekf on ros kinetic and picture A is robot_localization in ros noetic. also I have attached my launch file from ros noetic is there any advice about how can i modify picture A to picture B?

I am using ubuntu 20.04 server

<launch>
  <arg name="custom_param_file" default="$(find mini_turty3)/param/dummy.yaml"/>


    <node pkg="tf" type="static_transform_publisher" name="map_to_odom_combined_broadcaster" args="-0.0 0.0 0.0 0.0 0.0 0.0 map odom_combined 100" /> 


<!-- JJ - add IMU -->
  <node pkg="minimu9-ahrs" type="minimu9-ahrs-ros" name="minimu9" output="screen">
    <param name="enable_odom_transform" value="0"/>
  </node>

    <node pkg="robot_localization" type="ekf_localization_node" name="robot_pose_ekf" output="screen">
    <param name="output_frame" value="odom_combined"/>
    <param name="freq" value="30.0"/>
    <param name="sensor_timeout" value="1.0"/>
    <param name="odom_used" value="true"/>
    <param name="imu_used" value="true"/>
    <param name="vo_used" value="false"/>
    <param name="debug" value="false"/>
    <param name="self_diagnose" value="false"/>

    <!-- <remap from="imu_data" to="imu"/> -->
  </node>

  <!-- JJ - add EKF -->



<!-- JJ - add mini-turty robot model, state publishers -->
  <arg name="model" />
  <arg name="gui" default="False" />
<!--  <param name="robot_description" textfile="$(find mini_turty3)/launch/mini_turty.urdf" /> -->
  <param name="robot_description" textfile="$(find mini_turty3)/launch/test.urdf" /> 
  <param name="use_gui" value="$(arg gui)"/>
  <node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" ></node>
  <node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" ></node>

<!-- JJ - add some scanner params initialization -->
  <remap from="cmd_vel" to="/navigation_velocity_smoother/raw_cmd_vel"/>

<!-- JJ - add lidar -->
  <node name="ydlidar_node"  pkg="ydlidar_ros"  type="ydlidar_node" output="screen">
    <param name="port"         type="string" value="/dev/ttyS0"/>
    <!--<param name="baudrate"     type="int"    value="230400"/> -->
    <param name="baudrate"     type="int"    value="230400"/>
<!-- JJ - changed to match what we've got in the urdf (base_laser)!
    <param name="frame_id"     type="string" value="laser_frame"/> -->
    <param name="frame_id"     type="string" value="base_laser"/>
    <param name="angle_fixed"  type="bool"   value="true"/>
    <param name="low_exposure"  type="bool"   value="false"/>
    <param name="heartbeat"    type="bool"   value="false"/>
    <param name="resolution_fixed"    type="bool"   value="true"/>
    <param name="angle_min"    type="double" value="-180" />
    <param name="angle_max"    type="double" value="180" />
    <param name="range_min"    type="double" value="0.08" />
    <param name="range_max"    type="double" value="16.0" />
    <param name="ignore_array" type="string" value="" />
    <param name="samp_rate"    type="int"    value="9"/>
    <param name="frequency"    type="double" value="7"/>
  </node>

  <!-- Map server -->
  <arg name="map_file" default="$(env MINI_TURTY_MAP_FILE)"/>
  <node name="map_server" pkg="map_server" type="map_server" args="$(arg map_file)" />

  <arg name="initial_pose_x" default="0.0"/>-- Use 17.0 for willow's map in simulation -->
  <arg name="initial_pose_y" default="0.0 ...
(more)
edit retag flag offensive close merge delete

Comments

It is very difficult to read the transform trees in your pictures. Please, post larger versions and describe the differences. Your launch file is also difficult to read. Can you correct the formatting?

tryan gravatar image tryan  ( 2020-12-01 09:32:50 -0500 )edit

Hi, Thank for your reply. I have updated the post accordingly. Thank you

johnson_em gravatar image johnson_em  ( 2020-12-01 20:52:55 -0500 )edit

I assume you're only concerned with the missing odom_combined to base_footprint transform--not the caster. Are you getting any errors/warnings from the ekf_localization_node? Setting debug = true may yield more helpful information, too. Looking at the robot_localization documentation, output_frame and freq don't seem to be parameters. One thing to try is replacing

<param name="output_frame" value="odom_combined"/>

with

<param name="base_link_output_frame" value="base_footprint"/>

You may also need to change other frame names, and depending on your topic names, you may need to do some remapping, too. Use rqt_graph to see if nodes/topics are connected correctly. Make sure that the EKF node is getting data on topics it expects with correct frame names.

tryan gravatar image tryan  ( 2020-12-02 09:18:42 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-12-09 04:56:40 -0500

Tom Moore gravatar image

I'm a little confused. You are launching the EKF from robot_localization, but giving it parameters that appear to be from robot_pose_ekf.

<node pkg="robot_localization" type="ekf_localization_node" name="robot_pose_ekf" output="screen">
<param name="output_frame" value="odom_combined"/>
<param name="freq" value="30.0"/>
<param name="sensor_timeout" value="1.0"/>
<param name="odom_used" value="true"/>
<param name="imu_used" value="true"/>
<param name="vo_used" value="false"/>
<param name="debug" value="false"/>
<param name="self_diagnose" value="false"/>
</node>

Please show:

  1. Your robot_pose_ekf config
  2. Your robot_localization config (they should not be the same)
  3. A sample sensor message from every sensor input
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2020-12-01 04:05:00 -0500

Seen: 120 times

Last updated: Dec 09 '20