Conversation
… black whole megacommit
6d4bbbf to
f988cb3
Compare
2494782 to
00af7e3
Compare
c239da1 to
71cec18
Compare
| // TODO: Add exception handling | ||
| sdf::ElementPtr controller_sdf = brain_sdf->GetElement("rv:controller"); | ||
| revolve::DifferentialCPG::ControllerParams params; | ||
| params.reset_neuron_random = (controller_sdf->GetAttribute("reset_neuron_random")->GetAsString() == "true"); |
There was a problem hiding this comment.
I think we should safe check if all of these SDF parameters are present before we present it to the students :)
Now seems the right moment to do it
There was a problem hiding this comment.
I started on this, but the default genome for the examples is directedtree with neural network brain. This already has checks in place. I will add cppn body & brain later after this merge and then I will add the checks to the cpg brain classes.
| explicit DifferentialCPPNCPG(const sdf::ElementPtr brain_sdf, | ||
| const std::vector< MotorPtr > &_motors); | ||
|
|
||
| protected: |
There was a problem hiding this comment.
tabs here, replace with spaces
| namespace gazebo | ||
| { | ||
|
|
||
| class ActuatorWrapper: public revolve::Actuator |
There was a problem hiding this comment.
double check: is this wrapper still needed or can it be removed from the code?
| else | ||
| { | ||
| this->output[j] = this->signal_factor_all_*this->abs_output_bound*((2.0)/(1.0 + std::pow(2.718, -2.0*x/this->abs_output_bound)) -1); | ||
| this->output[j] = this->signal_factor_all_*this->abs_output_bound*((2.0)/(1.0 + std::pow(2.718, -2.0 * x_input / this->abs_output_bound)) - 1); |
There was a problem hiding this comment.
should we adjust the output to be in between 0 and 1 here? instead of -1;+1
There was a problem hiding this comment.
If we do that we need to change in other places as well right? like where it is used and also where input is generated
| ///////////////////////////////////////////////// | ||
| MotorPtr MotorFactory::Create(sdf::ElementPtr _motorSdf) | ||
| { | ||
| auto coordinates = _motorSdf->GetAttribute("coordinates"); |
There was a problem hiding this comment.
Check for errors in parsing the SDF also here.
pyrevolve/evolution/fitness.py
Outdated
| return total_angle | ||
|
|
||
|
|
||
| # This will not be part of future code, solely for experimental practice |
There was a problem hiding this comment.
# This will not be part of future code, solely for experimental practice
Then let's remove it XD
| :return: Mutated parameters | ||
| :rtype: dict|list | ||
| """ | ||
|
|
There was a problem hiding this comment.
I don't remember what this file is for
There was a problem hiding this comment.
I have no idea but its contents appear to be used in revolve
|
|
||
| PROTO_FOLDER='../cpprevolve/revolve/gazebo/msgs' | ||
| GAZEBO_PROTO_FOLDER='/home/matteo/Tools/gazebo/include/gazebo-10/gazebo/msgs/proto/' | ||
| GAZEBO_PROTO_FOLDER=:"${HOME}/installed/include/gazebo-10/gazebo/msgs/proto/" |
There was a problem hiding this comment.
this line is probably wrong, needs to be adjusted for each computer. We could try using pkg-confing to find the correct folder location, or ask the user...
worlds/plane.recording.world
Outdated
| </camera> | ||
| <always_on>1</always_on> | ||
| <update_rate>30</update_rate> | ||
| <plugin name='RecordingCameraController' filename='libRecorderCameraPlugin.so'> |
There was a problem hiding this comment.
should we keep this plugin or not XD
ca12125 to
3fce2b0
Compare
00ccf6c to
fb6853e
Compare
…sdf parameters. Not yet fully tested but putting it out there so i can continue later
90e9c15 to
adf9179
Compare
No description provided.