Code: Select all
m_pcCamera->Enable();
This is a sample project. I tried to recreate the issue of my main project in it.I don't understand what you're trying to accomplish. The code you gave me has a number of issues.
Again, I'm not sure what you're trying to accomplish here, but if you want to delete stuff, do it in PostStep() and not in PreStep().
- In the loop functions, you have a loop over all the epuck. Within this loop, you erase all of the boxes. Why? Looping once over the boxes is enough.
- The way you erase the boxes does not work. You can iterate over a container and erase elements at the same time - this creates a memory corruption.
- The code is in the PreStep() method. This means that you add the boxes in Init(), allow ARGoS to take note of them, and then remove them before ARGoS has the possibility to update anything. This creates a memory corruption, which leads to the specific problem you're encountering.
Code: Select all
error: 'argos::CLEDMedium' is an incomplete type
Code: Select all
#include <argos3/plugins/simulator/media/led_medium.h>