Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@surgura
Copy link

@surgura surgura commented Aug 9, 2021

No description provided.

@surgura surgura force-pushed the aart/heritability_cleanup branch from 6d4bbbf to f988cb3 Compare August 9, 2021 11:13
@surgura surgura force-pushed the aart/heritability_cleanup branch from 2494782 to 00af7e3 Compare August 9, 2021 11:51
@surgura surgura force-pushed the aart/heritability_cleanup branch from c239da1 to 71cec18 Compare August 9, 2021 12:06
// 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
Contributor

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

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

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

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
Contributor

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

/////////////////////////////////////////////////
MotorPtr MotorFactory::Create(sdf::ElementPtr _motorSdf)
{
auto coordinates = _motorSdf->GetAttribute("coordinates");
Copy link
Contributor

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
Contributor

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
Author

Choose a reason for hiding this comment

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

Removed

:return: Mutated parameters
:rtype: dict|list
"""

Copy link
Contributor

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


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
Contributor

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

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

@surgura surgura force-pushed the aart/heritability_cleanup branch from ca12125 to 3fce2b0 Compare August 10, 2021 12:29
@surgura surgura force-pushed the aart/heritability_cleanup branch from 00ccf6c to fb6853e Compare August 16, 2021 08:02
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
@surgura surgura force-pushed the aart/heritability_cleanup branch from 90e9c15 to adf9179 Compare August 16, 2021 14:52
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