Skip to content

Modify chassis_gimbal_shooter_manual logic - #150

Open
Bluefairy-ljy wants to merge 7 commits into
rm-controls:masterfrom
Bluefairy-ljy:update_manual
Open

Modify chassis_gimbal_shooter_manual logic#150
Bluefairy-ljy wants to merge 7 commits into
rm-controls:masterfrom
Bluefairy-ljy:update_manual

Conversation

@Bluefairy-ljy

Copy link
Copy Markdown

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the manual control logic for the chassis/gimbal/shooter stack by adding ballistic-solver integration, wheel-online safety handling, and new keybindings/service triggers to better coordinate deploy/aim/fire behavior.

Changes:

  • Added subscriptions and state for ballistic solution + wheel online status, plus a wheel-offline gating check.
  • Introduced new command senders/services (active suspension, ballistic solver request, relocate) and new keyboard actions (e.g., Ctrl+C, Q).
  • Simplified/adjusted deploy/TRAJ behavior, including manual ballistic yaw/pitch adjustment while deployed and controller start/stop transitions.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/chassis_gimbal_shooter_manual.cpp Adds wheel-online + ballistic-solution runtime logic, new service/key behaviors, and command-sending changes.
include/rm_manual/chassis_gimbal_shooter_manual.h Declares new callbacks, senders/subscribers, and state for the updated manual logic.
include/rm_manual/chassis_gimbal_shooter_cover_manual.h Adjusts Ctrl+R release declaration to match the updated base interface.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 814 to 821
if (chassis_cmd_sender_->getMsg()->mode != rm_msgs::ChassisCmd::RAW && !deployed_)
{
double roll{}, pitch{}, yaw{};
try
{
quatToRPY(tf_buffer_.lookupTransform("base_link", "yaw", ros::Time(0)).transform.rotation, roll, pitch, yaw);
}
catch (tf2::TransformException& ex)
{
ROS_WARN("%s", ex.what());
}
ballistic_yaw_ = ballistic_solution_.data[0];
ballistic_pitch_ = ballistic_solution_.data[1];
gimbal_cmd_sender_->setGimbalTrajFrameId("base_link");
gimbal_cmd_sender_->setMode(rm_msgs::GimbalCmd::TRAJ);
traj_yaw_ = yaw, traj_pitch_ = -0.585;
gimbal_cmd_sender_->setGimbalTraj(traj_yaw_, traj_pitch_);
gimbal_cmd_sender_->setGimbalTraj(ballistic_yaw_, ballistic_pitch_);
setChassisMode(rm_msgs::ChassisCmd::DEPLOY);
Comment on lines 873 to +878
void ChassisGimbalShooterManual::ctrlQPress()
{
shooter_calibration_->reset();
gimbal_calibration_->reset();
adjust_image_transmission_ = false;
up_change_position_ = false;
low_change_position_ = false;
need_change_position_ = false;
image_transmission_cmd_sender_->off();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants