ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Robot localization no output without GPS

asked 2018-05-01 14:03:47 -0500

matteopantano gravatar image

Hey guys,

I have a small issue here. I am running r_l with a fusion of GPS RTK, imu and wheel odometry. However, I encounter a small problem when GPS data is not available. Let me explain: my GPS package publishes GPS coordinates if and only if RTK is FIXED if it is not id does not, actually that make sense. My r_l configuration works really great when I have RTK the only problem I have, as mentioned in the title, is that the state estimation does not publish any x,y data if GPS does not publish and that is a small problem whenever I will lose GPS fix for some seconds or I will start my system with no clear sky view.

Any hints on how to solve that?

Launch file:

<launch>
  <param name="use_sim_time" value="true" />

  <rosparam command="load" file="$(find rovitis_launch)/config/gps_odom.yaml" />

  <node pkg="tf" type="static_transform_publisher" name="base_link_to_camera" args="1.65 0 0.65 0 0 0 base_link camera 10"/>
  <node pkg="tf" type="static_transform_publisher" name="base_link_to_imu_link" args="1.41 0 1.24 -0.0246 0.0129 -0.0007 0.9996 base_link imu_link 10"/>
  <node pkg="tf" type="static_transform_publisher" name="base_link_to_gps" args="0.83 0 1.37 0 0 0 base_link GPS_link 10"/>
  <node pkg="tf" type="static_transform_publisher" name="base_link_to_imu" args="0.83 0.55 0.48 0 0 -3.14 base_link piksi_board 10"/>

  <node pkg="rosbag" type="play" name="player" output="screen" args="--clock /home/matteo/Desktop/test_30_04/exit_garage_no_rl.bag"/>

  <node pkg="rviz" type="rviz" name="rviz" output="screen"/>

  <node pkg="tf" type="static_transform_publisher" name="odom_frame_to_robots_start_pose" args="0 0 0 0 0 0 /odom_fixed /start_fixed_base_frame 10"/>

    <node pkg="robot_localization" type="ekf_localization_node" name="ekf_se_odom" clear_params="true"/>

    <node pkg="robot_localization" type="ekf_localization_node" name="ekf_se_map" clear_params="true">
      <remap from="odometry/filtered" to="odometry/filtered_map"/>
    </node>

    <node pkg="robot_localization" type="navsat_transform_node" name="navsat_transform" clear_params="true">
      <rosparam command="load" file="$(find rovitis_launch)/config/navsat_transform.yaml" />
      <remap from="odometry/filtered" to="odometry/filtered_map"/>
      <remap from="gps/fix" to="piksi/navsatfix_rtk_fix"/>
    </node>

</launch>

navsat transform:

frequency: 30
delay: 3.0
magnetic_declination_radians: 0.0539  # For lat/long 45.2266641° N ,  11.9843053° E
yaw_offset: -0.031 #-0.031 # IMU reads 0 facing magnetic north, not east


# If this is true, the altitude is set to 0 in the output odometry message. Defaults to false.
zero_altitude: true

# If this is true, the transform world_frame->utm transform is broadcast for use by other nodes. Defaults to false.
broadcast_utm_transform: true

# If this is true, the utm->world_frame transform will be published instead of the world_frame->utm transform.
# Note that broadcast_utm_transform still has to be enabled. Defaults to false.
broadcast_utm_transform_as_parent_frame: false

# If this is true, all received odometry data is converted back to a lat/lon and published as a NavSatFix message as
# /gps/filtered. Defaults to false.
publish_filtered_gps: false

# If this is true, the node ignores the IMU data and gets its heading from the odometry source (typically the
# /odometry/filtered topic coming from one of robot_localization's state estimation nodes). BE CAREFUL ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2018-05-01 16:03:35 -0500

stevejp gravatar image

Can you verify the odometry topic you are using in r_l? Your param file says it's called "odom", but the bag file does not contain any topics named odom (maybe odom_fixed?).

edit flag offensive delete link more

Comments

Yes it is working! I over-sighted it. Thanks Steve!

matteopantano gravatar image matteopantano  ( 2018-05-01 23:10:32 -0500 )edit

@matteopantano: please accept the answer by @stevejp by ticking the checkmark to the left of his answer.

We don't normally close questions here on ROS Answers, especially not when they're actually answered.

gvdhoorn gravatar image gvdhoorn  ( 2018-05-02 01:41:19 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2018-05-01 14:03:47 -0500

Seen: 529 times

Last updated: May 01 '18