Skip to content

Commit

Permalink
Merge branch 'master' of github.com:ichiro-its/suiryoku into feature/…
Browse files Browse the repository at this point in the history
…adjust-function-for-dynamic-kick
  • Loading branch information
hiikariri committed Jun 27, 2024
2 parents 48aa9d9 + d0f7177 commit 2bfb923
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/suiryoku/locomotion/process/locomotion.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ class Locomotion
std::string config_name;

bool initial_pivot;
keisan::Angle<double> pivot_stop_limit;

private:
double move_min_x;
Expand Down
3 changes: 3 additions & 0 deletions src/suiryoku/locomotion/process/locomotion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ void Locomotion::set_config(const nlohmann::json & json)
bool valid_section = true;

double pivot_target_tilt_double;
double pivot_stop_limit_double;

valid_section &= jitsuyo::assign_val(pivot_section, "min_x", pivot_min_x);
valid_section &= jitsuyo::assign_val(pivot_section, "max_x", pivot_max_x);
Expand All @@ -179,8 +180,10 @@ void Locomotion::set_config(const nlohmann::json & json)
valid_section &= jitsuyo::assign_val(pivot_section, "max_delta_direction", pivot_max_delta_direction);
valid_section &= jitsuyo::assign_val(pivot_section, "pan_range_a_speed", pivot_pan_range_a_speed);
valid_section &= jitsuyo::assign_val(pivot_section, "target_tilt", pivot_target_tilt_double);
valid_section &= jitsuyo::assign_val(pivot_section, "pivot_stop_limit", pivot_stop_limit_double);

pivot_target_tilt = keisan::make_degree(pivot_target_tilt_double);
pivot_stop_limit = keisan::make_degree(pivot_stop_limit_double);

if (!valid_section) {
std::cout << "Error found at section `pivot`" << std::endl;
Expand Down

0 comments on commit 2bfb923

Please sign in to comment.