-
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
Aart/heritability cleanup #112
base: master
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tabs here, replace with spaces
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.
removed tabs from all files
namespace gazebo | ||
{ | ||
|
||
class ActuatorWrapper: public revolve::Actuator |
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.
double check: is this wrapper still needed or can it be removed from the code?
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.
Use nowhere so removed
@@ -449,7 +552,7 @@ void DifferentialCPG::step( | |||
// Don't use frame of reference | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we adjust the output to be in between 0 and 1 here? instead of -1;+1
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.
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
@@ -58,6 +60,7 @@ MotorPtr MotorFactory::Motor( | |||
///////////////////////////////////////////////// | |||
MotorPtr MotorFactory::Create(sdf::ElementPtr _motorSdf) | |||
{ | |||
auto coordinates = _motorSdf->GetAttribute("coordinates"); |
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# This will not be part of future code, solely for experimental practice
Then let's remove it XD
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.
Removed
@@ -441,12 +441,16 @@ def get_epsilon_mutated_parameters(self, params, serialize=False): | |||
:return: Mutated parameters | |||
:rtype: dict|list | |||
""" | |||
|
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 don't remember what this file is for
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 have no idea but its contents appear to be used in revolve
@@ -3,7 +3,7 @@ | |||
set -e | |||
|
|||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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...
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.
gazebo as submodule?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we keep this plugin or not XD
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.
it has been exterminated
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.