how to get the id of a current robot?

Requests regarding how to set up experiments in ARGoS.
yunxiaoshan
Posts: 2
Joined: Fri Feb 03, 2023 5:26 am

how to get the id of a current robot?

Postby yunxiaoshan » Fri Feb 03, 2023 5:37 am

Hi,
I hope to get the id of current robot. I find the example(trajectory.argos) to get all the id of robots in the environment. But how to get the id of a robot? For example, in the example of diffusion_10, if I want to communicate the id of a robot to another, how should I get that?
I tried to define an object of

Code: Select all

CFootBotEntity centity;
and use the

Code: Select all

centity.GetId()
function. Nevertheless, I get an empty string. I try to find out that in other examples, it seems all the other examples show how to get all the robots, but not current robot.
Thanks.
-shan

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

Re: how to get the id of a current robot?

Postby pincy » Fri Feb 03, 2023 5:57 am

I made ARGoS.

yunxiaoshan
Posts: 2
Joined: Fri Feb 03, 2023 5:26 am

Re: how to get the id of a current robot?

Postby yunxiaoshan » Fri Feb 03, 2023 6:08 am

problem solved, thank you very much.
-shan


Return to “How to... ?”