Ask Your Question
0

Navigation of turtlebot on static map

asked 2019-08-22 15:39:15 -0500

enthusiast.australia gravatar image

hello. I am using turtlebot burger with kinetic and ubuntu 16.04. I am not using lidar or any sensor to make a map, rather i have used a static map made in an image editor. I have been able to make this map run on map server, but when i use rviz to esimate initial pose and give some navigation goal command, i can not do so. i run roscore on PC,then roslaunch on turtlebot, then start map server, then start rviz, but something is missing. How can i do autnomous navigation using my static map. regards

edit retag flag offensive close merge delete

Comments

Do you have a transform to map? Normally you would use a sensor with amcl to localise a position in the map.

PapaG gravatar imagePapaG ( 2019-08-22 18:06:14 -0500 )edit

I am just using odometry to locate and move robot. What do you mean by transform to map? I just make a static map, make the corresponding .pgm and .yaml file, and make it to map server. Then i start rviz, but i am unable to give 2D pose estimation and 2D navigation goal using rviz. I have not used any laser or any other sensor to make the map

enthusiast.australia gravatar imageenthusiast.australia ( 2019-08-23 06:40:01 -0500 )edit

You probably want to run without amcl and gmapping and use odom as global frame

Humpelstilzchen gravatar imageHumpelstilzchen ( 2019-08-23 11:14:04 -0500 )edit

Yes,i want to run it without gmapping, but somehow i am unable to do so. i run roscore on PC,then roslaunch on turtlebot, then start map server, then start rviz but after that, iam stuck. What should i do to move my robot?

enthusiast.australia gravatar imageenthusiast.australia ( 2019-08-23 13:56:00 -0500 )edit

@enthusiast.australia: please mark a question as answered by clicking the checkmark to the left of the answer.

We don't close questions here when they are answered.

gvdhoorn gravatar imagegvdhoorn ( 2019-09-08 10:43:28 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-08-23 18:51:43 -0500

PapaG gravatar image

Your issue arises from not having a localisation in the map frame. You are localising yourself in the odom frame but not in the map frame. The transform should be as per ROS REP 105. To solve this since you cannot use amcl to localise in the map frame, you should run the map in the odom frame. From default, you will be loading the map with map server of which has the parameter frame_id which specifies what frame to load the map in. Use case will be:

command line

rosrun map_server map_server mymap.yaml frame_id:=odom

launch

<launch>

  <arg name="map_file" default="$(find [package where your map is])/mymap.yaml"/>

  <!-- Run the map server -->
  <node name="map_server" pkg="map_server" type="map_server" args="$(arg map_file)" >
        <param name="frame_id" value="odom"/>
 </node>

</launch>
edit flag offensive delete link more

Comments

Thank you for your help, but i am still having a problem. first thing, it might be irrelevant but in rviz, i am unable to provide my robot modle. i use this command before rviz "export TURTLEBOT3_MODEL=burger" but still i am unable to do so. secondly, when i give 2D pose estimate, it records value in terminal and also when i give 2 D goal, it shows me the goal coordinates but the robot does not move. Am i missing some pakg or something? i created a map, loaded in odometry frame as you helped, then started rviz and give 2Dgoal command, is there something else to do to make robot go to destination?

enthusiast.australia gravatar imageenthusiast.australia ( 2019-08-24 19:07:59 -0500 )edit

Have you setup the navigation stack? Follow the tutorials if not.

PapaG gravatar imagePapaG ( 2019-08-24 22:25:07 -0500 )edit

In the navigation stack, how can i skip/change laser sensor part as i am not using it. Also, do i need to alter my costmap,local map or something from the tutorial, and if yes can you help in this regard. It is because i am using static map as stated above. Many thanks brother

enthusiast.australia gravatar imageenthusiast.australia ( 2019-08-25 16:40:42 -0500 )edit

You don't provide any sources to the cost map, therefore it should be blank. You don't need amcl as you aren't localizing in the map frame, you are to specify your map in odom.

PapaG gravatar imagePapaG ( 2019-08-26 06:20:26 -0500 )edit

Please what do you mean by providing sources to cost map? there are three files of cost map, cost_map_common_params.yaml, global_costmap_params.yaml and local_costmap_params.yaml. so, what to alter and where?

Also, I used navigation stack for turtlebot. i have specified my map in odom But when i run rviz, i can see my turtlebot,i can use 2D esitmation but unable to use 2D navigation goal. How could i alter my files. And i get this warning.

enthusiast.australia gravatar imageenthusiast.australia ( 2019-08-26 06:43:12 -0500 )edit

I think you should read the tutorials in the navigation stack and understand how the stack interacts.

PapaG gravatar imagePapaG ( 2019-08-26 21:41:24 -0500 )edit

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: 2019-08-22 15:39:15 -0500

Seen: 28 times

Last updated: Aug 23