-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP integrating Learning in evolution #84
base: development
Are you sure you want to change the base?
Conversation
Added compiled proto files (c++ and python)
and added reporter in hyperneat
…oat to double in protobuf robotstateslearning.proto.
- C++14 - removed old DifferentialCPG - reset robot position after evaluation - load best controller at the end of learning - better separated learner and controller when loading - fixed implicit conversion of negative integer into unsigned integer
the NN needs to be activated as many times as the network is deep
- Added AngleToTargetDetectorClass - Added camera to HW controller - added OpenCV dependency - added raspicam dependency
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am a bit worried that some of the changes will affect the way we do experiments in the future, and I am not sure how much of these changes will actually be reusable.
: next_state(nullptr) | ||
const DifferentialCPG::ControllerParams ¶ms, | ||
const std::vector<std::shared_ptr<Actuator>> &actuators, | ||
std::shared_ptr<AngleToTargetDetector> angle_to_target_sensor) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does every future version need to specify these parameters?
const NEAT::Genome &gen) | ||
: next_state(nullptr) | ||
const NEAT::Genome &gen, | ||
std::shared_ptr<AngleToTargetDetector> angle_to_target_sensor) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this necessary for future experiments?
|
||
double DifferentialCPG::output_function(double input) const | ||
{ | ||
return this->output_signal_factor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Split up formula for better readability.
@@ -78,7 +78,7 @@ if (LOCAL_GAZEBO_DIR) | |||
NO_DEFAULT_PATH) | |||
message(WARNING "Using local Gazebo @ ${gazebo_DIR}") | |||
else() | |||
find_package(gazebo 9 REQUIRED) | |||
find_package(gazebo 10 REQUIRED) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this change generally needed?
const std::vector<std::shared_ptr<Actuator>> &_actuators); | ||
const DifferentialCPG::ControllerParams ¶ms, | ||
const std::vector<std::shared_ptr<Actuator>> &_actuators, | ||
std::shared_ptr<AngleToTargetDetector> angle_to_target_sensor = nullptr); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed for future experiments?
this->current_position_.Reset(); | ||
this->previous_position_.Reset(); | ||
this->start_position_.Reset(); | ||
this->locomotion_type = "directed"; // {directed, gait} | ||
this->locomotion_type = "turing_left"; // {directed, gait} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the new standard approach?
this->path_length = 0.0; | ||
} | ||
|
||
///////////////////////////////////////////////// | ||
Evaluator::~Evaluator() = default; | ||
|
||
///////////////////////////////////////////////// | ||
void Evaluator::Reset() | ||
void Evaluator::reset() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No more camel case for functions?
std::cout << "Loading controller " << controller_type << " and learner " << learner << std::endl; | ||
auto brain_sdf = _sdf->GetElement("rv:brain"); | ||
auto controller_type = brain_sdf->GetElement("rv:controller")->GetAttribute("type")->GetAsString(); | ||
auto learner_type = brain_sdf->GetElement("rv:learner")->GetAttribute("type")->GetAsString(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert tabs?
@@ -265,10 +295,28 @@ void RobotController::CheckUpdate(const ::gazebo::common::UpdateInfo _info) | |||
/// Default update function simply tells the brain to perform an update | |||
void RobotController::DoUpdate(const ::gazebo::common::UpdateInfo _info) | |||
{ | |||
auto currentTime = _info.simTime.Double() - initTime_; | |||
const gz::common::Time current_time = _info.simTime - initTime_; | |||
const double current_time_d = current_time.Double(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert tabs?
|
||
if (brain_) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where did the brain go?
- Continue run - Load best genome IMC: - Modularity from yaml - open-loop logging BO: - LHS initialization Evaluator: - Logging components of the fitnesses - Reset robot correctly with fitness Positionmotor: - Added possibility for motor input noise python_code: - Added yaml functionality for IMC plane.world: - Added realtime and camera #commented <!-- -->
- Continue run - Load best genome IMC: - Modularity from yaml - open-loop logging BO: - LHS initialization Evaluator: - Logging components of the fitnesses - Reset robot correctly with fitness Positionmotor: - Added possibility for motor input noise python_code: - Added yaml functionality for IMC plane.world: - Added realtime and camera #commented <!-- -->
- Continue run - Load best genome IMC: - Modularity from yaml - open-loop logging BO: - LHS initialization Evaluator: - Logging components of the fitnesses - Reset robot correctly with fitness Positionmotor: - Added possibility for motor input noise python_code: - Added yaml functionality for IMC plane.world: - Added realtime and camera #commented <!-- -->
- Continue run - Load best genome IMC: - Modularity from yaml - open-loop logging BO: - LHS initialization Evaluator: - Logging components of the fitnesses - Reset robot correctly with fitness Positionmotor: - Added possibility for motor input noise python_code: - Added yaml functionality for IMC plane.world: - Added realtime and camera #commented <!-- -->
No description provided.