std::bad_cast

Requests regarding how to set up experiments in ARGoS.
badri86
Posts: 8
Joined: Thu May 16, 2019 10:02 am

std::bad_cast

Postby badri86 » Wed May 22, 2019 10:06 am

I'm using 2 controllers for fot-boot

Code: Select all

<distribute> <position max="-2, -2, 0.0" method="uniform" min="-3, -3, 0.0"/> <orientation mean="0, 0, 0" method="gaussian" std_dev="360, 0, 0"/> <entity max_trials="100" quantity="4"> <foot-bot id="FB_3"><controller config="ffc"/></foot-bot> </entity> </distribute> <distribute> <position max="0.5, 0.5, 0.0" method="uniform" min="-0.5, -0.5, 0.0"/> <orientation mean="0, 0, 0" method="gaussian" std_dev="360, 0, 0"/> <entity max_trials="100" quantity="2"> <foot-bot id="FS_1"><controller config="ssc"/></foot-bot> </entity> </distribute>
code in loop-function:

Code: Select all

CFootBotEntity& cFootBot = *any_cast<CFootBotEntity*>(it->second); CFootBotForaging& cController = dynamic_cast<CFootBotForaging&>(cFootBot.GetControllableEntity().GetController()); CScout& sController = dynamic_cast<CScout&>(cFootBot.GetControllableEntity().GetController());
but I have an error when I launch ARGoS with this error:
std::bad_cast
std::bad_cast

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

Re: std::bad_cast

Postby pincy » Wed Jun 05, 2019 4:20 am

It's hard to tell what's going on. Can you share your code in a form that is easy to compile and run?
I made ARGoS.


Return to “How to... ?”