Page 1 of 1

how to get the id of a current robot?

Posted: Fri Feb 03, 2023 5:37 am
by yunxiaoshan
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

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

Posted: Fri Feb 03, 2023 5:57 am
by pincy

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

Posted: Fri Feb 03, 2023 6:08 am
by yunxiaoshan
problem solved, thank you very much.
-shan