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

How to give goal using robot localization

asked 2020-04-19 10:56:35 -0500

me_saw gravatar image

updated 2020-04-20 07:43:58 -0500

I've setup the move_base and and robot_localization and I'm getting Datum UTM coordinate is (483236.261047, 6674529.600528) when i launch the localization file.

How to know who's publishing these values and how to publish these values to move_base?

I created robot_localization files referring to husky's files

I've read that I have to convert LLto utm but why it's giving me utm values

edit: launch file

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

  <group ns="gps_nav"> 
  <rosparam command="load" file="$(find sk_navigation)/params/ekf_params.yaml" />
  <rosparam command="load" file="$(find sk_navigation)/params/navsat_params_sim.yaml" />

  <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" output="screen" >
      <remap from="odometry/filtered" to="odometry/filtered_map"/>
      <remap from="gps/fix" to="/sk/gps/fix"/>
      <remap from="/imu/data" to="/sk/imu"/>
  </node>
  </group>

</launch>

params

ekf_se_odom:
  frequency: 30
  sensor_timeout: 0.1
  two_d_mode: true
  transform_time_offset: 0.0
  transform_timeout: 0.0
  print_diagnostics: true
  debug: false

  map_frame: map
  odom_frame: odom
  base_link_frame: base_link
  world_frame: odom

# -------------------------------------
# Wheel odometry:

  odom0: /odom
  odom0_config: [false, false, false,
                 false, false, false,
                 true,  true,  true,
                 false, false, false,
                 false, false, false]
  odom0_queue_size: 10
  odom0_nodelay: true
  odom0_differential: false
  odom0_relative: false

# --------------------------------------
# imu configure:

  imu0: /sk/imu
  imu0_config: [false, false, false,
                true,  true,  false,
                false, false, false,
                true,  true,  true,
                true,  true,  true]
  imu0_nodelay: false
  imu0_differential: false
  imu0_relative: false
  imu0_queue_size: 10
  imu0_remove_gravitational_acceleration: true

  use_control: false
  use_control: false

  process_noise_covariance: [1e-3, 0,    0,    0,    0,    0,    0,     0,     0,    0,    0,    0,    0,    0,    0,
                             0,    1e-3, 0,    0,    0,    0,    0,     0,     0,    0,    0,    0,    0,    0,    0,
                             0,    0,    1e-3, 0,    0,    0,    0,     0,     0,    0,    0,    0,    0,    0,    0,
                             0,    0,    0,    0.3,  0,    0,    0,     0,     0,    0,    0,    0,    0,    0,    0,
                             0,    0,    0,    0,    0.3,  0,    0,     0,     0,    0,    0,    0,    0,    0,    0,
                             0,    0,    0,    0,    0,    0.01, 0,     0,     0,    0,    0,    0,    0,    0,    0,
                             0,    0,    0,    0,    0,    0,    0.5,   0,     0,    0,    0,    0,    0,    0,    0,
                             0,    0,    0,    0,    0,    0,    0,     0.5,   0,    0,    0,    0,    0,    0,    0,
                             0,    0,    0,    0,    0,    0,    0,     0,     0.1,  0,    0,    0,    0,    0,    0,
                             0,    0,    0,    0,    0,    0,    0,     0,     0,    0.3,  0,    0,    0,    0,    0,
                             0,    0,    0,    0,    0,    0,    0,     0,     0,    0,    0.3,  0,    0,    0,    0,
                             0,    0,    0,    0,    0,    0,    0,     0,     0,    0,    0,    0.3,  0,    0,    0,
                             0,    0,    0,    0,    0,    0,    0,     0,     0,    0,    0,    0,    0.3,  0,    0,
                             0,    0,    0,    0,    0,    0,    0,     0,     0,    0,    0,    0,    0,    0.3,  0,
                             0,    0,    0,    0,    0,    0,    0,     0,     0,    0,    0,    0 ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2020-04-19 23:01:16 -0500

hashirzahir gravatar image

Actual navigation of the robot is handled by move_base. You will give position goals to move_base and move_base will provide velocity goals to your controller to bring your robot to the final pose without colliding into obstacles. robot_localization is a package used to obtain an accurate estimate of your current position by applying a kalman filter over it. Ensuring the GPS data is in UTM format is crucial since it follows the ROS ENU standard. If you want to know who is publishing what, please use rqt_graph and it will display the relationship between topics and ros nodes.

In move_base, you have to configure the odometry data by using ROS transform frames. If your GPS was published in a map to base_link frame, you can specify map as the global frame and base_link as the robot frame in move_base config file. move_base will use this information along with any costmap provided to navigate.

edit flag offensive delete link more

Comments

can you show me a example of robot_localizationrqt_grpah so that i can have an idea how it shoukd it look

me_saw gravatar image me_saw  ( 2020-04-20 05:29:42 -0500 )edit

The robot_localization node should take in 1 or 2 sensor data such as sensor_msgs::IMU from your IMU and maybe nav_msgs::Odometry from your GPS publisher. The robot_localization node will publish 1 topic, something like /odom/filtered. If you are not sure what your node is doing, you can do rosnode list on the command line and rosnode info NODE_NAME whatever you want to see. As mentioned, ideally, robot_localization will take in a few topics from your different sensors (in the correct ENU orientation) and output 1 filtered odometry topic that is a good localization estimate of your robot. Please check here to see the published topics of robot_localization

hashirzahir gravatar image hashirzahir  ( 2020-04-20 07:33:10 -0500 )edit

I referred to husky robot's localization to configure my files and I'm getting so many topics so I'm confused which what

I've edited the question and the params please check it once

me_saw gravatar image me_saw  ( 2020-04-20 07:45:40 -0500 )edit

First of all, why do you have 2 nodes <node pkg="robot_localization" type="ekf_localization_node" name="ekf_se_odom" clear_params="true"/> running? ekf_se_odom and ekf_se_map. The data sources are exactly the same for odom0 and imu0 so why do you need 2 nodes?

hashirzahir gravatar image hashirzahir  ( 2020-04-20 07:56:04 -0500 )edit

I thought for map i should another node

so it's not required?

me_saw gravatar image me_saw  ( 2020-04-20 08:03:49 -0500 )edit

What is the map frame for in your use case? Traditionally, ROS follows map -> odom -> base_link where odom->base_link is the dead-reckoning based estimation that is used for low level controls. It updates at a high frequency. map->odom is a correction provided by some algorithm (say SLAM or GPS) to fix the finalized odometry if the GPS updates at a slow rate. Please explain what is your use case and what is your TF tree. What is your end goal?

hashirzahir gravatar image hashirzahir  ( 2020-04-20 09:37:07 -0500 )edit

I'm using gps and I want to know the current position of my robot and i want to input gps coordinates as goal to move_base to move to a certain position

me_saw gravatar image me_saw  ( 2020-04-20 09:44:55 -0500 )edit

i got /odom/filter its giving me the twist and pose values what are these values how to use these values move to a certain position by giving it to move_base

and I'm also launching navsat_transform its publishing two topics what are they and how to them

me_saw gravatar image me_saw  ( 2020-04-20 09:48:32 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2020-04-19 10:56:35 -0500

Seen: 524 times

Last updated: Apr 20 '20