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

Build a a own navigation using RVIZ for initial and goal position

asked 2019-10-16 12:47:51 -0600

Tima1995 gravatar image

Hey guys,

I am right now trying to build up my own navigation solution. I succesfully made it to let my robot start from a initial to a goal position using my own navigation algo. Now I am trying to use RVIZ for setting the initial and goal position by simply marking it on the map as estimations. I saw, that the turtlebot uses the same solution for it` navigation program. I had a look at that one and it seems pretty complex with the amcl package etc.

The only thing I need is getting the initial and goal position as coordinates as input for my algo. The precision of the localization is not a priority for me. But here comes my question. I can use

rospy.wait_for_message('move_base_simple/goal', PoseStamped)
rospy.Subscriber('move_base_simple/goal', PoseStamped, self.update_goal)

to get the goal position, but is there also something to get the initial position?

Secondly, I tried to use

rosrun map_server map_server map.yaml

for loading my map but nothing happened. Is there another command to get into the GUI where I can load my map and choose the positions for goal and start?

Kind regards and thanks in advance!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-10-16 13:11:03 -0600

I'm going to dissect this a bit.

I succesfully made it to let my robot start from a initial to a goal position using my own navigation algo

Nice!

The only thing I need is getting the initial and goal position as coordinates as input for my algo.

mhm, sounds reasonable.

rospy.wait_for_message('move_base_simple/goal', PoseStamped)

This line is unnecessary, just create the subscriber or you'll drop at minimum the first message.

rospy.Subscriber('move_base_simple/goal', PoseStamped, self.update_goal)

Looks good.

also something to get the initial position

Well, what do you have broadcasting the initial position? If nothing and you're just trying to mark on the map, you could use the goal tool where first call is pose and second is goal, but that's not very clean. The RVIZ goal tool is very simple, in about an hour you could make a new plugin of the same type that broadcasts a selected pose in the same way on another topic to subscribe to.

map_server

Not entirely sure what map_server has to do with this. That's just broadcasting the map topic, you really shouldn't see anything going on. This has nothing to do with navigation other that broadcasting an occupancy grid.

edit flag offensive delete link more

Comments

Thanks for the answer! Regarding map_server , I am not very common with RVIZ. Then I have to have a deeper look at that one. I already got a .yaml and .pgm file from a SLAM and want to use that one to mark the initial and goal position on it... Ah, I need to save it as *.rviz file, my fault!

Tima1995 gravatar image Tima1995  ( 2019-10-16 15:07:29 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2019-10-16 12:47:51 -0600

Seen: 328 times

Last updated: Oct 16 '19