turtlebot3 + GPS localizaion

asked 2020-04-09 08:35:39 -0500

Ray_student gravatar image

Hi I am new in ROS. I am using nvidia tx2 under ubuntu 16.04 LTS os . ROS version:kinetic

I find this package to fuse odom and imu data . and this is my test launch file

<launch>
<node pkg = "robot_localization" type="ekf_localization_node" name="ekf_localization">
    <rosparam command="load" file="$(find test)/config/ekf_localization.yaml"/>
</node>
</launch>

ekf_localization.yaml:

  frequency: 50

two_d_mode : true

publish_tf : false



odom0: /odom   #odom source for respective robot
odom0_config: [false, false, false,
false, false, false,
true, true, true,
false, false, true,
false, false, false]
odom0_differential: false
imu0: /imu #imu source for respective bot
imu0_config: [false, false, false,
false, false, false,
false, false, false,
false, false, true,
true, false, false]
imu0_differential: false
odom_frame: odom  # fixed frame for robot (this can be same for both)
base_link_frame: base_link #fixed frame for robot (this should be diffenret for both)
world_frame: odom #again same is fine

I think I had made some mistakes , please help me to figure it out. Thanks.

edit retag flag offensive close merge delete

Comments

Hi @Ray_student,

Could you explain a little bit what are you trying to do and what are your problems, because after reading the post I noticed you did not mention any problem or asked any question.

Weasfas gravatar image Weasfas  ( 2020-04-10 11:14:34 -0500 )edit

Hi thanks for your comment. I met most problem is I don't know what is correct result. now I just get a topic /odom_filter but no any information.

Ray_student gravatar image Ray_student  ( 2020-04-13 04:40:07 -0500 )edit

When you use the efk or ufk nodes you should provide first a config file to stablish all necessary parameters. In this file you provide, apart from the frames, the set of odometry topics to extract the odom info in order to perform the fusion. Once you provide the proper topics the node will output a topic in wich you will find the odom fusion from all of your sources. The default topic name is odometry/filtered and you can remap it in the launch file.

Hence, the correct result depends on your sep up. As I see in your config file you are performing a fusion with odom and imu data, taking with odom only vx, vy, vz, and vyaw and with imu vyaw and ax. This means that, with your set up, you are only using velocity and acceleration to perform localization.

Weasfas gravatar image Weasfas  ( 2020-04-13 13:33:28 -0500 )edit

You will find more information about robot_localization package here.

Weasfas gravatar image Weasfas  ( 2020-04-13 13:34:00 -0500 )edit

I know more about this knowledge . Very thank you. but I notice that if I launch this

roslaunch turtlebot3_bringup turtlebot3_remote.launch

the topic : odometry/filtered will get information .

I don't understand the connection between this situation. Seems to be related to robot_state_publisher?

Ray_student gravatar image Ray_student  ( 2020-04-14 08:13:13 -0500 )edit

Mmm, the robot_state_publisher is a node that only generates the tf_tree with the robot_description (turtlebot in this case), the node itselft does not publish in any topic, only reads from /joint_states. You can execute rostopic info odometry/filtered to check what connections are using that topic. However, the topic is getting some information because the localization node is using the tf_tree generated to properly set up the odom and map frames. The param publish_tf is a flag to activate the publish transformations and map_frame, odom_frame, base_link_frame and world_frame specifies four principal coordinate frames for the robot. Generally, if you are using Gazebo, you already have the tf transform base_link-->base_footprint-->odom, thats is why I think you have information in that topic. However, ideally you may want to, not only base the localization in tf but input all your odometry topic to let the kalman filter do its job in the way ...(more)

Weasfas gravatar image Weasfas  ( 2020-04-15 17:45:53 -0500 )edit

Sorry for the late reply I am following this video now

https://www.youtube.com/watch?v=cmOplaq8cHc

about 22:18 he is finishing his launch file,I have some problems he is work on simulated environment and robot model not turtlebot3 , so I don’t know what he did first. I think this is necessary

roslaunch turtlebot3_bringup turtlebot3_robot.launch

And after referring to your statement ,robot_state_publisher is not necessary here?

I think your explanation is very clear, but I am still a little confused.

Ray_student gravatar image Ray_student  ( 2020-04-19 11:44:25 -0500 )edit
1

Hi @Ray_student,

So basically what he is doing is setting up the localization stack for the robot. He launches three instances of the robot_localization.

  1. The first one is the efk_node used to filter encoders odometry with IMU data to obtain a more precisse odometry from the robot in the odom frame.
  2. The second one is another efk_node used to filter encoders odometry, IMU and GPS data to obtain the localization of the robot in the map frame. The frame is important because the robot will be navigating in the map frame NOT in the odom frame.
  3. The third one is the navstat_transform node, that he uses to convert fix GPS coordiantes (latitude/longitude/altitude) into UTM coordinates that can be used in the efk_filter in the map coordinate frame with the proper axis conventions stablished is ROS.

Hence, with this set up, you have first a good odometry from encoders ...(more)

Weasfas gravatar image Weasfas  ( 2020-04-20 08:42:17 -0500 )edit