How to light movable boxes with custom colors

Requests regarding how to set up experiments in ARGoS.
Arun_AR
Posts: 10
Joined: Tue Aug 22, 2017 6:37 am

How to light movable boxes with custom colors

Postby Arun_AR » Fri Feb 09, 2018 5:52 am

<arena ...>
...
<box id="box1" size="0.75,0.1,0.5" movable="true" mass="2.5">
<body position="0.4,2.3,0" orientation="45,0,0" />
<leds medium="id_of_led_medium">
<led offset=" 0.15, 0.15,0.15" anchor="origin" color="white" />
<led offset="-0.15, 0.15,0" anchor="origin" color="red" />
<led offset=" 0.15, 0.15,0" anchor="origin" color="blue" />
<led offset=" 0.15,-0.15,0" anchor="origin" color="green" />
</leds>
</box>
...
</arena>

While giving color to movable obstacles. what syntax must be used to give custom values for r,g &b.

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

Re: How to light movable boxes with custom colors

Postby pincy » Fri Feb 09, 2018 7:29 am

Have a look here:

https://github.com/ilpincy/argos3/blob/ ... lor.h#L143

You can either use string constants, or the format "r,g,b,a" where each element is a value between 0 and 255.
I made ARGoS.

Arun_AR
Posts: 10
Joined: Tue Aug 22, 2017 6:37 am

Re: How to light movable boxes with custom colors

Postby Arun_AR » Sat Feb 10, 2018 5:46 pm

Thank You sir


Return to “How to... ?”