Skip to content
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

Open
wants to merge 32 commits into
base: master
Choose a base branch
from
Open

Aart/heritability cleanup #112

wants to merge 32 commits into from

Conversation

surgura
Copy link
Collaborator

@surgura surgura commented Aug 9, 2021

No description provided.

// 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");
Copy link
Member

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

Copy link
Collaborator Author

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:
Copy link
Member

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

Copy link
Collaborator Author

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
Copy link
Member

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?

Copy link
Collaborator Author

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);
Copy link
Member

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

Copy link
Collaborator Author

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");
Copy link
Member

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.

return total_angle


# This will not be part of future code, solely for experimental practice
Copy link
Member

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

pyrevolve/evolution/population/population_management.py Outdated Show resolved Hide resolved
@@ -441,12 +441,16 @@ def get_epsilon_mutated_parameters(self, params, serialize=False):
:return: Mutated parameters
:rtype: dict|list
"""

Copy link
Member

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

Copy link
Collaborator Author

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/"
Copy link
Member

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...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gazebo as submodule?

</camera>
<always_on>1</always_on>
<update_rate>30</update_rate>
<plugin name='RecordingCameraController' filename='libRecorderCameraPlugin.so'>
Copy link
Member

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it has been exterminated

Aart Stuurman added 2 commits August 16, 2021 10:27
…sdf parameters. Not yet fully tested but putting it out there so i can continue later
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants