How to obtain current position of the robot

Requests regarding how to set up experiments in ARGoS.
fionashim
Posts: 6
Joined: Wed Feb 04, 2015 4:39 pm

How to obtain current position of the robot

Postby fionashim » Sun Jun 28, 2015 9:30 pm

I have an unknown environment with walls and obstacles, how can i obtain the position of the robot in Lua? My environment do not have any beacons or landmarks because the robots will not be able to propagate signals pass the walls and obstacles.

Thank you

pincy
Site Admin
Posts: 632
Joined: Thu Mar 08, 2012 8:04 pm
Location: Boston, MA
Contact:

Re: How to obtain current position of the robot

Postby pincy » Sun Jun 28, 2015 9:34 pm

Hi Fiona,

If you need the absolute position/orientation of the robot in the environment, you can add the positioning sensor in the .argos file (check out argos3 -q positioning for details).

Then you can access the data from Lua in the tables robot.positioning.position and robot.positioning.orientation. Shift-click on a robot to see the details of these data structures.

Cheers,
Carlo
I made ARGoS.

fionashim
Posts: 6
Joined: Wed Feb 04, 2015 4:39 pm

Re: How to obtain current position of the robot

Postby fionashim » Thu Jul 09, 2015 11:43 am

I have tried it and it works perfectly. Thank you so much


Return to “How to... ?”