-
Notifications
You must be signed in to change notification settings - Fork 15
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
[joint-torque-controller] velocity feedback in torque controller #38
Conversation
DECLARE_SIGNAL_OUT(torque_error_integral, dynamicgraph::Vector); /// integral of the torque tracking error | ||
DECLARE_SIGNAL_OUT(smoothSignDq, dynamicgraph::Vector); /// smooth approximation of sign(dq) | ||
DECLARE_SIGNAL_INNER(dq_motor, dynamicgraph::Vector); |
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 would declare dq_motor as an output signal so that we can plot it for debugging
src/joint-torque-controller.cpp
Outdated
const Eigen::VectorXd& dq_prev = buffer_dq; | ||
Eigen::VectorXd& dq_motor = buffer_dq_motor; | ||
|
||
//Runge Kutta integration y:=dq_motor; dy=f(t,y); y(n) = y_n |
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.
Why did you feel it was necessary to use a RK4 integration scheme? I think a straightforward Euler integration would do the job just as well, while making the code easier to read.
@@ -266,6 +269,7 @@ def create_balance_controller(robot, conf, motor_params, dt, robot_name='robot') | |||
plug(robot.estimator_ft.contactWrenchRightSole, ctrl.wrench_right_foot); | |||
plug(robot.estimator_ft.contactWrenchLeftSole, ctrl.wrench_left_foot); | |||
plug(ctrl.tau_des, robot.torque_ctrl.jointsTorquesDesired); | |||
plug(ctrl.dv_des, robot.torque_ctrl.jointsAccelerationsDesired); |
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.
Actually dv_des contains also the base accelerations, which should not appear in jointAccelerationsDesired!
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.
Reading the code below I see that actually you take only the last nbJoints values of the signal jointsAccelerationsDesired, so the behavior of the system is correct. In this, the problem is just the name of the signal jointsAccelerationsDesired that is not correct. I suggest to call it dv_des, as the output signal of the balance controller.
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.
Since the integration scheme is to be applied only to the joint accelerations and not to the base acceleration, I think your earlier comment might be more suitable. I'll change the size to NJ in the code and use vector selector to plug the required parts from ctrl.dv_des.
9652f7d
to
d0f1fc9
Compare
Hi Rohan, did you manage to make this work in simulation? If not, maybe it's better to wait before merging... |
Hey
I havn't tried it in simulation yet. Please do wait before merging.
…On October 30, 2017 10:21:48 PM GMT+01:00, Andrea Del Prete ***@***.***> wrote:
Hi Rohan, did you manage to make this work in simulation? If not, maybe
it's better to wait before merging...
--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#38 (comment)
|
Adds velocity feedback term in joint-torque-controller.
Currently uses linear interpolation of
ddq_des
anddq
to perform runge-kutta integration ofddq_motor
Deals with #37