Skip to content

Commit

Permalink
Run pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
EtienneAr committed Feb 16, 2024
1 parent 901a4e0 commit 15d88ad
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 19 deletions.
8 changes: 4 additions & 4 deletions include/qrw/Params.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,10 @@ struct Params {
bool mpc_in_rosnode; // Run the MPC on a separate rosnode

// General control parameters
VectorN q_init; // Initial articular positions
VectorN pose_init; //Initial base pose
Scalar dt_wbc; // Time step of the whole body control
Scalar dt_mpc; // Time step of the model predictive control
VectorN q_init; // Initial articular positions
VectorN pose_init; // Initial base pose
Scalar dt_wbc; // Time step of the whole body control
Scalar dt_mpc; // Time step of the model predictive control
int mpc_wbc_ratio;
uint N_periods; // Number of gait periods in the MPC prediction horizon
bool save_guess; // true to save the initial result of the mpc
Expand Down
4 changes: 2 additions & 2 deletions python/quadruped_reactive_walking/tools/pybullet_sim.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,8 @@ def __init__(self, pose_init, q_init, env_id, use_flat_plane, enable_pyb_GUI, dt
# Set base pose
pyb.resetBasePositionAndOrientation(
self.robotId,
[pose_init[0], pose_init[1], z_offset], # Ignore Z_height to put the robot on the ground by default
pose_init[3:] #pin.Quaternion(pin.rpy.rpyToMatrix(p_roll, p_pitch, 0.0)).coeffs(),
[pose_init[0], pose_init[1], z_offset], # Ignore Z_height to put the robot on the ground by default
pose_init[3:], # pin.Quaternion(pin.rpy.rpyToMatrix(p_roll, p_pitch, 0.0)).coeffs(),
)

# Fix the base in the world frame
Expand Down
18 changes: 6 additions & 12 deletions src/Joystick.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,9 @@ Joystick::Joystick(Params const& params)
gp_alpha_pos = 0.0;
p_ref_.head(3) = params_->pose_init.head(3);
p_ref_.tail(3) = pinocchio::rpy::matrixToRpy(
Eigen::Quaternion<double>(
params_->pose_init(3),
params_->pose_init(4),
params_->pose_init(5),
params_->pose_init(6)
).toRotationMatrix());
Eigen::Quaternion<double>(
params_->pose_init(3), params_->pose_init(4), params_->pose_init(5), params_->pose_init(6))
.toRotationMatrix());

lock_time_L1_ = std::chrono::system_clock::now();

Expand Down Expand Up @@ -160,12 +157,9 @@ void Joystick::update_v_ref(int k, bool gait_is_static) {
gp_alpha_vel = params_->gp_alpha_vel;
p_ref_.head(3) = params_->pose_init.head(3);
p_ref_.tail(3) = pinocchio::rpy::matrixToRpy(
Eigen::Quaternion<double>(
params_->pose_init(3),
params_->pose_init(4),
params_->pose_init(5),
params_->pose_init(6)
).toRotationMatrix());
Eigen::Quaternion<double>(
params_->pose_init(3), params_->pose_init(4), params_->pose_init(5), params_->pose_init(6))
.toRotationMatrix());
gp_alpha_pos = 0.0;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Params.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Params::Params()
v_switch(),
fc_v_esti(0.0),

T_gait(0.0), // Period of the gait
T_gait(0.0), // Period of the gait
footsteps_under_shoulders(12) // Fill with zeros, will be filled with values later
{
Kp_main.setZero();
Expand Down

0 comments on commit 15d88ad

Please sign in to comment.