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

Send automatically nav goal based on the map

asked 2021-07-14 07:26:27 -0600

al_ca gravatar image

updated 2021-07-14 07:29:22 -0600

Hello there,

I am trying to create a script that sends automatically nav goals around a wall (so 4 poses) and then go to the next one and so on until the are no more walls left (see the photo below). I am thinking of sub into the map topic and take the edges of the wall and then convert them to poses after publishing them to move base, but I don't know how exactly to implement this... any ideas??

Thank you in advance!

image description

edit retag flag offensive close merge delete

Comments

I am a bit confused by your question. Are you trying to avoid the wall or just trying to send goals in a sequential manner? Also, what sensors are you working with?

Akhil Kurup gravatar image Akhil Kurup  ( 2021-07-14 08:51:35 -0600 )edit

the second one, the sensors I am using are lidar,imu and Odometry

al_ca gravatar image al_ca  ( 2021-07-14 09:19:47 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-07-14 10:23:45 -0600

updated 2021-07-14 10:24:01 -0600

If you know the poses apriory, why not just use a for loop to go through them? Compare your current pose and goal pose to know when you have reached your goal and update your iterator.
If you also want to avoid the wall, you could use some mapping stack (gmapping, rtabmap, etc.) to generate a costmap which can be passed on to the nav stack for avoidance.

edit flag offensive delete link more

Comments

Firstly thank your for your time and effort and sorry for my poor explanation of the question, also could you please explain what do you mean here "If you know the poses apriory". So my problem is how to find these poses, were the only thing I have is the map topic.

I need something to always work regardless where the walls are. The algorithm I need is to detect the edges of the walls and convert them into x,y coordinates automatically wherever I put the walls.

In other words I have already generated the map from gmapping and I want to write a code that reads from the pgm file or from the map topic and detects these four poses that I have mentioned from all the walls that exist without me intervene in the code whenever the map changes.

Please feel free to ask for clarifications. :)

al_ca gravatar image al_ca  ( 2021-07-14 10:58:30 -0600 )edit

Ahh! I see. So you want to route around targets by setting goal poses.

There are several ways to do this and I cant think of any packages that will have such a specific implementation. You could just use the lidar scans and perform some sort of range measurements and edges/corners detection to set a goal as close as possible to these artifacts.
Maybe you could also look at the costmap and look for gradients (where object edges finish and drive-able area starts).
You could also try doing the same to the pgm image and then transforming them into your robots frame.

A bigger question is why? What's your application? Why not just rely on the nav stack for planning around obstacles?

Akhil Kurup gravatar image Akhil Kurup  ( 2021-07-14 11:28:09 -0600 )edit

Hmm, interesting... have you in mind of something where I can find applications or examples regarding edge & corner detection or with the gradient you mentioned?

Because I want a custom route based on the walls and I want the robot, in this case, to go around the walls and then move to the next. It's just a personal project that could apply to agriculture.

al_ca gravatar image al_ca  ( 2021-07-14 13:42:06 -0600 )edit

Unfortunately, No. I haven't come across any such project

Akhil Kurup gravatar image Akhil Kurup  ( 2021-07-14 17:09:17 -0600 )edit

It's okay I will find a way to do this. Thank you again for your help!

al_ca gravatar image al_ca  ( 2021-07-16 02:29:04 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2021-07-14 07:26:27 -0600

Seen: 209 times

Last updated: Jul 14 '21