Skip to content

Commit

Permalink
Merge branch 'master' into standard1
Browse files Browse the repository at this point in the history
# Conflicts:
#	include/rm_manual/chassis_gimbal_shooter_cover_manual.h
  • Loading branch information
liyixin135 committed Jul 18, 2024
2 parents 8cb89e1 + de20f92 commit 9972018
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
8 changes: 8 additions & 0 deletions src/chassis_gimbal_manual.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,19 @@ void ChassisGimbalManual::updateRc(const rm_msgs::DbusData::ConstPtr& dbus_data)
{
ManualBase::updateRc(dbus_data);
gimbal_cmd_sender_->setRate(-dbus_data->ch_l_x, -dbus_data->ch_l_y);
if (gimbal_cmd_sender_->getMsg()->mode == rm_msgs::GimbalCmd::RATE)
chassis_cmd_sender_->setFollowVelDes(gimbal_cmd_sender_->getMsg()->rate_yaw);
else
chassis_cmd_sender_->setFollowVelDes(0.);
}
void ChassisGimbalManual::updatePc(const rm_msgs::DbusData::ConstPtr& dbus_data)
{
ManualBase::updatePc(dbus_data);
gimbal_cmd_sender_->setRate(-dbus_data->m_x * gimbal_scale_, dbus_data->m_y * gimbal_scale_);
if (gimbal_cmd_sender_->getMsg()->mode == rm_msgs::GimbalCmd::RATE)
chassis_cmd_sender_->setFollowVelDes(gimbal_cmd_sender_->getMsg()->rate_yaw);
else
chassis_cmd_sender_->setFollowVelDes(0.);
}

void ChassisGimbalManual::checkReferee()
Expand Down
9 changes: 7 additions & 2 deletions src/chassis_gimbal_shooter_manual.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -353,8 +353,13 @@ void ChassisGimbalShooterManual::mouseLeftPress()
}
if (prepare_shoot_)
{
shooter_cmd_sender_->setMode(rm_msgs::ShootCmd::PUSH);
shooter_cmd_sender_->checkError(ros::Time::now());
if (!mouse_right_event_.getState() || (mouse_right_event_.getState() && track_data_.id != 0))
{
shooter_cmd_sender_->setMode(rm_msgs::ShootCmd::PUSH);
shooter_cmd_sender_->checkError(ros::Time::now());
}
else
shooter_cmd_sender_->setMode(rm_msgs::ShootCmd::READY);
}
}

Expand Down

0 comments on commit 9972018

Please sign in to comment.