navigation stack and robot_localization

asked 2019-09-08 06:47:46 -0500

enthusiast.australia gravatar image

updated 2019-09-08 10:34:24 -0500

Hello everyone. I am confused and need help. I have implemented navigation stack on my robot. I am not using any sensor at the moment but able to navigate in a map with obstacles by using only odometry. Now i have implemented a sensor which gives me position x and y in string message of std_msg. And i want to use this information to locate my robot and navigate. I have few confusions/questions at this stage.

  1. How can i convert this string message to use as odometry message or how can i use this information to locate my robot?

  2. If i use robot_localization, is this approach right? Or should i go for robot_pose_ekf? In both options. how should i use my data from sensor?

  3. And if i somehow do first 2 things, how will i navigate my robot ? How should i use move_base with robot_localization?

Currently i use rviz or this approach to give a goal position command. link text

How should i modify things? i am researching on these problems, but i am very confused at the moment. Any help will be highly appreciated.

edit retag flag offensive close merge delete

Comments

Regarding:

Now i have implemented a sensor which gives me position x and y in string message of std_msg

What kind of sensor is it? Does it give the position of the robot? Also which localization did you use before adding the sensor into the system?
1) and 2), if you are going to use robot_localization you will need to parse the sting and create a nav_msgs/Odometry or geometry_msgs/PoseWithCovarianceStamped msg. You can post an example of the string msg so we can see how the data is stored.
3) You can use move_base normally as you already have as long as you have a working localization.

pavel92 gravatar image pavel92  ( 2019-09-08 14:38:22 -0500 )edit

It is UWB sensor,the receiver is mounted on robot. I have made a program which use transmission time from transmitters and gives me an x and y position of the robt. I used navigation stack without amcl as i had a static map and i run everything in odometry frame. so if i have a working localization , let say, robot_localisation, i can still work with move_base? And it string is

e.g 1.85858871 1.65656588 where the first one is position in x axis and 2 value is y axis. A continuous data come from sensor with a baud rate of 115200. How can i change this into nav_msgs/Odometry?

enthusiast.australia gravatar image enthusiast.australia  ( 2019-09-08 14:48:20 -0500 )edit

move_base works with both amcl and robot_localization. You can check this answer for more info and examples regarding robot_localization. As for the message, if it comes as std_msgs/String in the form you explained then you can convert it into nav_msgs/Odometry or geometry_msgs/PoseWithCovarianceStamped msg in the callback by simply parsing the string and then feed that message into robot_localization

pavel92 gravatar image pavel92  ( 2019-09-08 15:30:00 -0500 )edit

I'm a bit unsure on how you use the UWB sensor. Odometry gives relative position information while with UWB sensors one usually gets absolute position information with position jumps. If so you probably want to use your UWB localization as a "replacement" for amcl, using it for the transformation from map to odom.

Humpelstilzchen gravatar image Humpelstilzchen  ( 2019-09-09 07:27:21 -0500 )edit