diff --git a/cpprevolve/revolve/gazebo/plugin/RobotController.cpp b/cpprevolve/revolve/gazebo/plugin/RobotController.cpp index e5a4caafd6..913335b796 100644 --- a/cpprevolve/revolve/gazebo/plugin/RobotController.cpp +++ b/cpprevolve/revolve/gazebo/plugin/RobotController.cpp @@ -17,6 +17,8 @@ * */ +#include + #include #include @@ -203,6 +205,10 @@ void RobotController::LoadBrain(const sdf::ElementPtr _sdf) { brain_.reset(new DifferentialCPG(this->model_, brain, motors_, sensors_)); } + else + { + throw std::runtime_error("Robot brain is not defined."); + } } /////////////////////////////////////////////////