Skip to content

Commit

Permalink
Merge pull request #39 from westonrobot/feature-ranger_parking_mode
Browse files Browse the repository at this point in the history
ugv_sdk: ranger: implemented parking mode within sdk for Ranger Mini …
  • Loading branch information
rdu-weston authored Sep 27, 2023
2 parents 9f7dd39 + 50b8152 commit 83f1406
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/ugv_sdk/details/interface/ranger_interface.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ struct RangerInterface {
kDualAckerman = 0,
kParallel = 1,
kSpinning = 2,
kSideSlip = 3
kPark = 3,
kSideSlip = 4
};

virtual ~RangerInterface() = default;
Expand Down
9 changes: 9 additions & 0 deletions include/ugv_sdk/details/robot_base/ranger_base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,15 @@ class RangerMiniV1Base : public RangerBaseV2 {
~RangerMiniV1Base() = default;

// robot control
void SetMotionMode(uint8_t mode) override {
if (mode == RangerInterface::MotionMode::kPark) {
return;
} else if (mode == RangerInterface::MotionMode::kSideSlip) {
mode = 3;
}
AgilexBase::SetMotionMode(mode);
}

void SetMotionCommand(double linear_vel, double steer_angle,
double angular_vel) override {
auto state = GetRobotState();
Expand Down

0 comments on commit 83f1406

Please sign in to comment.