Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/rm_manual/chassis_gimbal_shooter_cover_manual.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class ChassisGimbalShooterCoverManual : public ChassisGimbalShooterManual
void cPress() override;
void qPress() override;
void ctrlRPressing();
void ctrlRRelease() override;
void ctrlRRelease();
void wPress() override;
void wPressing() override;
void aPressing() override;
Expand Down
2 changes: 1 addition & 1 deletion include/rm_manual/wheeled_balance_manual.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class WheeledBalanceManual : public BalanceManual
void ctrlZPress() override;
void bPress() override;
void vPress() override;
void ctrlXPress();
void ctrlXPress() override;
void modeFallen(ros::Duration duration);
void modeNormalize();
rm_common::BalanceCommandSender* balance_chassis_cmd_sender_{};
Expand Down
1 change: 1 addition & 0 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<buildtool_depend>catkin</buildtool_depend>
<!-- depend: build, export, and execution dependency -->
<depend>roscpp</depend>
<depend>control_toolbox</depend>
<depend>sensor_msgs</depend>
<depend>rm_msgs</depend>
<depend>rm_common</depend>
Expand Down
20 changes: 2 additions & 18 deletions src/balance_manual.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,8 @@ void BalanceManual::rightSwitchMidRise()
void BalanceManual::ctrlZPress()
{
ChassisGimbalShooterCoverManual::ctrlZPress();
if (supply_)
{
chassis_cmd_sender_->setMode(rm_msgs::ChassisCmd::FALLEN);
chassis_cmd_sender_->power_limit_->updateState(rm_common::PowerLimit::CHARGE);
}
else
{
chassis_cmd_sender_->setMode(rm_msgs::ChassisCmd::FOLLOW);
chassis_cmd_sender_->power_limit_->updateState(rm_common::PowerLimit::NORMAL);
}
chassis_cmd_sender_->setMode(rm_msgs::ChassisCmd::FOLLOW);
chassis_cmd_sender_->power_limit_->updateState(rm_common::PowerLimit::NORMAL);
}

void BalanceManual::shiftRelease()
Expand Down Expand Up @@ -96,8 +88,6 @@ void BalanceManual::wPressing()
if (flank_)
flank_ = !flank_;
ChassisGimbalShooterCoverManual::wPressing();
if (supply_)
vel_cmd_sender_->setLinearXVel(x_scale_ * 0.4);
}

void BalanceManual::sPress()
Expand All @@ -114,8 +104,6 @@ void BalanceManual::sPressing()
if (flank_)
flank_ = !flank_;
ChassisGimbalShooterCoverManual::sPressing();
if (supply_)
vel_cmd_sender_->setLinearXVel(x_scale_ * 0.4);
}

void BalanceManual::aPress()
Expand All @@ -130,8 +118,6 @@ void BalanceManual::aPressing()
if (!flank_)
flank_ = !flank_;
ChassisGimbalShooterCoverManual::aPressing();
if (supply_)
vel_cmd_sender_->setLinearYVel(y_scale_ * 0.4);
}

void BalanceManual::dPress()
Expand All @@ -146,8 +132,6 @@ void BalanceManual::dPressing()
if (!flank_)
flank_ = !flank_;
ChassisGimbalShooterCoverManual::dPressing();
if (supply_)
vel_cmd_sender_->setLinearYVel(y_scale_ * 0.4);
}

void BalanceManual::cPress()
Expand Down
5 changes: 0 additions & 5 deletions src/legged_wheel_balance_manual.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,6 @@ void LeggedWheelBalanceManual::rightSwitchMidRise()
void LeggedWheelBalanceManual::ctrlZPress()
{
BalanceManual::ctrlZPress();
if (!supply_)
{
setChassisMode(rm_msgs::ChassisCmd::FOLLOW);
legCommandSender_->setLgeLength(0.18);
}
}

void LeggedWheelBalanceManual::shiftRelease()
Expand Down
9 changes: 1 addition & 8 deletions src/wheeled_balance_manual.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,7 @@ void WheeledBalanceManual::rightSwitchMidRise()
void WheeledBalanceManual::ctrlZPress()
{
BalanceManual::ctrlZPress();
if (supply_)
{
balance_chassis_cmd_sender_->setBalanceMode(rm_msgs::BalanceState::FALLEN);
}
else
{
balance_chassis_cmd_sender_->setBalanceMode(rm_msgs::BalanceState::NORMAL);
}
balance_chassis_cmd_sender_->setBalanceMode(rm_msgs::BalanceState::NORMAL);
}

void WheeledBalanceManual::vPress()
Expand Down
Loading