Open
Conversation
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.
DaanZ
commented
May 13, 2020
Author
DaanZ
left a comment
There was a problem hiding this comment.
Attention needed not to override Bo learner functionality experiments.
|
|
||
| // Start the evaluator | ||
| this->evaluator_.reset(new Evaluator(this->evaluationRate_)); | ||
| //this->evaluator_.reset(new Evaluator(this->evaluationRate_/*TODO find the battery */)); |
| void PositionMotor::write( | ||
| const double *outputs, | ||
| double /*step*/) | ||
| double /*step*/ |
|
|
||
|
|
||
| std::system(("mkdir -p " + this->directory_name).c_str()); | ||
| std::system(("mkdir -p " + this->directory_name).c_str()); |
Contributor
There was a problem hiding this comment.
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 |
Contributor
There was a problem hiding this comment.
floor when positive instead of abs
Contributor
There was a problem hiding this comment.
CMD is the desired angular velocity (from PID) and not real velocity (from physics engine)
Author
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added Roy's commits to the development branch to speed up merging.