Search found 48 matches

Go to advanced search

by AntonioC
Sun Jan 30, 2022 3:43 pm
Forum: How to... ?
Topic: Clarification on the operation of the ambient light sensor and distance from it
Replies: 5
Views: 13890

Re: Clarification on the operation of the ambient light sensor and distance from it

I positioned the light source at the same height as the Kilobot (0.03) and I eliminated the function that made 300 samples and I directly used the function for the ambient light. Since the greater the distance, the smaller the value the function returns, then I expect high values when the Kilobot is...
by AntonioC
Sat Jan 29, 2022 6:23 pm
Forum: How to... ?
Topic: Clarification on the operation of the ambient light sensor and distance from it
Replies: 5
Views: 13890

Re: Clarification on the operation of the ambient light sensor and distance from it

I put a high maximum value but still I get strange values. For example, in this experiment a kilobot stops very far from the light source. #include<kilolib.h> #include<stdlib.h> #include<stdio.h> #include<stdbool.h> #define MAXLIGHT 900 #define SAMPLEMAX 300 int randomAngle; int randomForeward; int ...
by AntonioC
Sat Jan 29, 2022 5:08 pm
Forum: How to... ?
Topic: Clarification on the operation of the ambient light sensor and distance from it
Replies: 5
Views: 13890

Clarification on the operation of the ambient light sensor and distance from it

I am trying to make the kilobot stop when it is near a light source. I encounter some problems and I have a series of questions. what is the unit of measurement of the value specified in the <light> tag in the intensity attribute? I read that the greater the distance of the Kilobot from the light so...
by AntonioC
Tue Jan 25, 2022 4:36 pm
Forum: How to... ?
Topic: Error while initializing light entity
Replies: 1
Views: 7297

Error while initializing light entity

I tried to add a light source in the trajectory file but it gives me the following error [FATAL] Failed to initialize the space. [FATAL] Error while initializing light entity [FATAL] While updating the LED grid for LED "l0" [FATAL] CGrid<ENTITY>::UpdateCell() : index (0,0,0) out of bounds ...
by AntonioC
Mon Jan 24, 2022 9:03 pm
Forum: How to... ?
Topic: Failed any_cast conversion from argos::CKilobotEntity* to argos::CDirectionalLEDEntity*
Replies: 7
Views: 20959

Re: Failed any_cast conversion from argos::CKilobotEntity* to argos::CDirectionalLEDEntity*

I had to add the library as well #include <argos3/plugins/simulator/entities/led_equipped_entity.h>
Now everything works. :D
by AntonioC
Mon Jan 24, 2022 7:32 pm
Forum: How to... ?
Topic: Failed any_cast conversion from argos::CKilobotEntity* to argos::CDirectionalLEDEntity*
Replies: 7
Views: 20959

Re: Failed any_cast conversion from argos::CKilobotEntity* to argos::CDirectionalLEDEntity*

Since not a is a pointer I cannot use the operator ->. You could use the period. But even that doesn't work. I also tried a cast but nothing.
by AntonioC
Mon Jan 24, 2022 6:00 pm
Forum: How to... ?
Topic: Failed any_cast conversion from argos::CKilobotEntity* to argos::CDirectionalLEDEntity*
Replies: 7
Views: 20959

Re: Failed any_cast conversion from argos::CKilobotEntity* to argos::CDirectionalLEDEntity*

I used the code you wrote but I get the following error at compile time. antonio@antonio-Lenovo-V110-15AST:~/Documents/argos3-kilobot-master/build$ make [ 1%] Automatic MOC for target argos3plugin_simulator_kilolib [ 1%] Built target argos3plugin_simulator_kilolib_autogen [ 5%] Built target argos3pl...
by AntonioC
Sun Jan 23, 2022 2:14 pm
Forum: How to... ?
Topic: Failed any_cast conversion from argos::CKilobotEntity* to argos::CDirectionalLEDEntity*
Replies: 7
Views: 20959

Failed any_cast conversion from argos::CKilobotEntity* to argos::CDirectionalLEDEntity*

To make the system detect the GetColor () function for the Kilobot led color, it was necessary to cast. During the compilation phase I do not get any error but when I start the experiment I get the following message [FATAL] Failed any_cast conversion from argos::CKilobotEntity* to argos::CDirectiona...
by AntonioC
Fri Jan 21, 2022 4:41 pm
Forum: How to... ?
Topic: Kilobot data and LoopFunction
Replies: 3
Views: 10144

Re: Kilobot data and LoopFunction

Below is the code of the ARK system #include "trajectory_loop_functions.h" /****************************************/ /****************************************/ CTrajectoryLoopFunctions::CTrajectoryLoopFunctions(): m_unDataAcquisitionFrequency(10){ } /**************************************...
by AntonioC
Thu Jan 20, 2022 11:23 pm
Forum: How to... ?
Topic: Kilobot data and LoopFunction
Replies: 3
Views: 10144

Kilobot data and LoopFunction

I am working with loop functions but I have some problems. I use the following functions but am told they are not declared. It seems strange to me since I have imported all the libraries. void CTrajectoryLoopFunctions::UpdateKilobotState(CKilobotEntity &c_kilobot_entity){ UInt16 unKilobotID=GetK...

Go to advanced search