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

Newer Battery #92

Open
wants to merge 20 commits into
base: development
Choose a base branch
from
Open

Newer Battery #92

wants to merge 20 commits into from

Conversation

DaanZ
Copy link

@DaanZ DaanZ commented May 12, 2020

Added Roy's commits to the development branch to speed up merging.

roy-basmacier and others added 18 commits July 9, 2019 13:15
Adjusted proto message to include battery charge and managed endpoints in cpp and py to set and get battery value.
Moved the robot state topic information about publishing frequency to the robot controller both in cpp and py to ensure that the robot is not blocked waiting on the world to respond on how much messages the robot has to send.
Tried using the robot configuration to set the initial charge, but it is not accepting any value despite the changes in the sdf configuration and the way it is accessed in the cpp code.
Furtermore the largest concern is the convoluted code surrounding the angle/.../world.py since it is closely connect to the way it gets the robot states, it is impossible to detach the responsibilities and move it to tol/.../world.py. This step requires refactoring of the entire robot/world paradigm.
…e battery state when it is requested to change. Currectly this request is never made, but should be cleaned up in the future to set the battery state with the new battery approach.
…e battery state when it is requested to change. Currectly this request is never made, but should be cleaned up in the future to set the battery state with the new battery approach.
Copy link
Author

@DaanZ DaanZ left a comment

Choose a reason for hiding this comment

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

Attention needed not to override Bo learner functionality experiments.

cpprevolve/revolve/gazebo/brains/Evaluator.cpp Outdated Show resolved Hide resolved
cpprevolve/revolve/gazebo/brains/Evaluator.cpp Outdated Show resolved Hide resolved
cpprevolve/revolve/gazebo/cmake_install.cmake Outdated Show resolved Hide resolved
@@ -75,7 +75,7 @@ RLPower::RLPower(
this->InitialisePolicy(numMotors);

// Start the evaluator
this->evaluator_.reset(new Evaluator(this->evaluationRate_));
//this->evaluator_.reset(new Evaluator(this->evaluationRate_/*TODO find the battery */));
Copy link
Author

Choose a reason for hiding this comment

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

Fix

@@ -79,7 +79,8 @@ PositionMotor::~PositionMotor() = default;
/////////////////////////////////////////////////
void PositionMotor::write(
const double *outputs,
double /*step*/)
double /*step*/
Copy link
Author

Choose a reason for hiding this comment

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

empty argument name

experiments/bo_learner/GridSearch.py Show resolved Hide resolved
experiments/bo_learner/GridSearch.py Outdated Show resolved Hide resolved
experiments/bo_learner/GridSearch.py Outdated Show resolved Hide resolved
experiments/bo_learner/GridSearch.py Outdated Show resolved Hide resolved
experiments/bo_learner/GridSearch.py Outdated Show resolved Hide resolved

std::system(("mkdir -p " + this->directory_name).c_str());
std::system(("mkdir -p " + this->directory_name).c_str());
Copy link
Member

Choose a reason for hiding this comment

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

There has to be a better way to this (this is only UNIX for example). Also it could be a security issue

// TODO find which axis to use local or global
// TODO check the power if it should be positive or negative
// TODO change this for now im using the absolute value of the power so it always decreases from the joint movements
double power = -abs(cmd * jointWrench.body1Torque.Length()); // TODO check which torque to use 1 or 2
Copy link
Member

Choose a reason for hiding this comment

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

floor when positive instead of abs

Copy link
Member

Choose a reason for hiding this comment

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

CMD is the desired angular velocity (from PID) and not real velocity (from physics engine)

Copy link
Author

Choose a reason for hiding this comment

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

Since the angular velocity can be both positive and negative, (leading to positive and negative power), therefore we need the absolute value and negate this to get the purely negative power usage.

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.

3 participants