Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Paul Rouanet
ros2_control_bolt
Commits
27cc5f00
Commit
27cc5f00
authored
Jul 22, 2021
by
Paul Rouanet
Browse files
Delete kp_ and kd_ + modif gains in write (from URDF)
parent
2b85bc76
Changes
1
Hide whitespace changes
Inline
Side-by-side
ros2_control_bolt/src/system_bolt.cpp
View file @
27cc5f00
...
...
@@ -116,12 +116,6 @@ return_type SystemBoltHardware::init_robot(const hardware_interface::HardwareInf
// Define the robot (ODRI).
robot_
=
std
::
make_shared
<
Robot
>
(
main_board_ptr
,
joints_
,
imu
);
// Initialize gains
kp_
=
0.0
;
kd_
=
0.0
;
return
return_type
::
OK
;
}
...
...
@@ -607,8 +601,8 @@ hardware_interface::return_type SystemBoltHardware::read()
hw_states_
[
joint
.
name
].
position
=
sensor_positions
[
joint_name_to_motor_nb_
[
joint
.
name
]];
hw_states_
[
joint
.
name
].
velocity
=
sensor_velocities
[
joint_name_to_motor_nb_
[
joint
.
name
]];
hw_states_
[
joint
.
name
].
effort
=
measured_torques
[
joint_name_to_motor_nb_
[
joint
.
name
]];
hw_states_
[
joint
.
name
].
Kp
=
kp_
;
hw_states_
[
joint
.
name
].
Kd
=
kd_
;
hw_states_
[
joint
.
name
].
Kp
=
stod
(
joint
.
parameters
.
at
(
"kp"
))
;
hw_states_
[
joint
.
name
].
Kd
=
stod
(
joint
.
parameters
.
at
(
"kd"
))
;
}
// Assignment of IMU data (URDF)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment