Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deb package deploy action. #85

Closed
wants to merge 67 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
11c5b81
Engineer manual except auto_exchange and ui.
L-SY Jul 7, 2023
325e8e7
Merge remote-tracking branch 'origin/master'
L-SY Jul 7, 2023
7a4d86f
Delete remain exchange relative function.
L-SY Jul 7, 2023
5b71a39
Delete remain exchange relative function.
L-SY Jul 7, 2023
3075a70
Fix.
L-SY Jul 7, 2023
faf20db
Add servoAutoExchange.
L-SY Jul 7, 2023
4fad085
Add updateRc.
L-SY Jul 7, 2023
e1f27a8
Add updateRc.
L-SY Jul 7, 2023
b1c1d9b
Add shiftRRelease.
L-SY Jul 7, 2023
73b7352
Add config get.
L-SY Jul 8, 2023
2bce0ad
Add config get.
L-SY Jul 8, 2023
5280e09
Delete joint5_calibration.
L-SY Jul 8, 2023
782ca4f
Fix pr questions.
L-SY Jul 8, 2023
91471e6
Fix pr questions.
L-SY Jul 8, 2023
a2648e0
Add test info.
L-SY Jul 8, 2023
ebc0b0b
7-9 20:00.
L-SY Jul 9, 2023
3ff6f36
7-10 15:30.
L-SY Jul 10, 2023
eee09b0
7-10 17:30.
L-SY Jul 10, 2023
a887b96
Add joint limit check.
L-SY Jul 10, 2023
c2143d8
Add joint limit and time out check.
L-SY Jul 12, 2023
3e399a9
Useful version 7-13 22:50.
L-SY Jul 13, 2023
20531af
Add struct exchange_info to store all relative info.
L-SY Jul 14, 2023
55adbc5
Add pub.
L-SY Jul 14, 2023
74f7e89
Change servoExchange into one piece of Exchange.
L-SY Jul 14, 2023
f113472
Add old Exchange.
L-SY Jul 14, 2023
85dbefd
Add FindInfo.
L-SY Jul 14, 2023
85526aa
Add publisher.
L-SY Jul 15, 2023
154f404
Finish ServoMove write.
L-SY Jul 15, 2023
05f0db2
Finish ServoMove write.
L-SY Jul 15, 2023
d3c1674
Finish ServoMove write.
L-SY Jul 15, 2023
f15ec8d
New .h.
L-SY Jul 16, 2023
c7da7d7
Add Find process.
L-SY Jul 17, 2023
4009437
Add gimbal on.
L-SY Jul 17, 2023
f918449
Add PreAdjust process.
L-SY Jul 19, 2023
004917c
Add PreAdjust process.
L-SY Jul 19, 2023
0859a0c
7.21 .
L-SY Jul 21, 2023
40f4434
Add enterServo.
L-SY Jul 21, 2023
2e8aa9c
Add servo pid.
L-SY Jul 21, 2023
1aa0ec4
7.21 22:40.
L-SY Jul 21, 2023
2a31e02
Add joint7 controllers.
L-SY Jul 23, 2023
47f4896
Change pre-adjust.
L-SY Jul 24, 2023
c4d0ddc
Fix pre-adjust.
L-SY Jul 25, 2023
b9e07d5
All but not use.
L-SY Jul 25, 2023
2d3f97c
Record.
L-SY Jul 29, 2023
2efcb04
Record.
L-SY Jul 29, 2023
8a7e743
store.
L-SY Jul 30, 2023
55802f9
Add auto exchange.
L-SY Jul 30, 2023
63bc9b5
Add auto_exchange to ctrlz.
L-SY Jul 31, 2023
b67419d
new auto exchange urdf.
L-SY Aug 1, 2023
cb2cff9
add auto exchange.
L-SY Aug 1, 2023
619ccf8
delete middle_point.
L-SY Aug 2, 2023
3cd20cf
fix shift bug.
L-SY Aug 2, 2023
09b240b
useful version.
L-SY Aug 2, 2023
0715333
fix find bug.
L-SY Aug 2, 2023
f1877b0
Add timeout protect.
L-SY Aug 3, 2023
8000e4b
Add timeout protect.
L-SY Aug 3, 2023
02b061e
Fix isReachGoal().
L-SY Aug 3, 2023
77d4aa4
Add exchange info
L-SY Aug 3, 2023
e9e39ac
Add engineer ui.
L-SY Aug 5, 2023
0da340f
Add servo_z vel.
L-SY Aug 5, 2023
539212e
Car.
L-SY Aug 8, 2023
2a9f42b
Change for ecat.
L-SY Aug 10, 2023
1b65487
Up servo angular z velocity.
L-SY Aug 10, 2023
6a310e4
Update deb_package.yml
cc0h Oct 6, 2023
038a53b
record.
cc0h Oct 18, 2023
2ab2bf0
Merge branch 'auto_exchange'
cc0h Oct 18, 2023
05d38b6
Merge remote-tracking branch 'origin/master'
cc0h Oct 18, 2023
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
9 changes: 5 additions & 4 deletions .github/workflows/deb_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,17 @@ jobs:
host: ${{ secrets.SOURCE_SSH_HOST }}
username: ${{ secrets.SOURCE_SSH_NAME }}
key: ${{ secrets.SOURCE_SSH_KEYGEN }}
port: ${{ secrets.SOURCE_SSH_PORT }}
source: "*.deb"
target: "/usr/local/web/rm-source/ubuntu/incoming/"
target: "/home/dynamicx/package_hub/wwwroot/ppa/incoming"
- name: Deploy deb package to source
if: ${{ github.repository == 'rm-controls/rm_manual' }}
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SOURCE_SSH_HOST }}
username: ${{ secrets.SOURCE_SSH_NAME }}
key: ${{ secrets.SOURCE_SSH_KEYGEN }}
port: ${{ secrets.SOURCE_SSH_PORT }}
script: |
cd /usr/local/web/rm-source/ubuntu/incoming/
reprepro -s -b /usr/local/web/rm-source/ubuntu/ --waitforlock 1000 includedeb focal /usr/local/web/rm-source/ubuntu/incoming/*.deb && \
rm -f *.deb
cd /home/dynamicx/package_hub/wwwroot/ppa/
bash deploy.sh
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ find_package(serial REQUIRED)
find_package(catkin REQUIRED
COMPONENTS
roscpp
engineer_middleware
sensor_msgs
rm_msgs
rm_common
Expand Down Expand Up @@ -43,6 +44,7 @@ catkin_package(
LIBRARIES
CATKIN_DEPENDS
roscpp
engineer_middleware
sensor_msgs
rm_msgs
rm_common
Expand Down
61 changes: 40 additions & 21 deletions include/rm_manual/engineer_manual.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@
#include <std_msgs/Float64.h>
#include <tf2_geometry_msgs/tf2_geometry_msgs.h>
#include <rm_msgs/EngineerAction.h>
#include <rm_msgs/MultiDofCmd.h>
#include <rm_msgs/GpioData.h>
#include <rm_msgs/EngineerUi.h>
#include <angles/angles.h>
#include <engineer_middleware/auto_exchange.h>

namespace rm_manual
{
Expand Down Expand Up @@ -55,31 +59,34 @@ class EngineerManual : public ChassisGimbalManual
void updateRc(const rm_msgs::DbusData::ConstPtr& dbus_data) override;
void updatePc(const rm_msgs::DbusData::ConstPtr& dbus_data) override;
void sendCommand(const ros::Time& time) override;
void updateServo(const rm_msgs::DbusData::ConstPtr& dbus_data);
void dbusDataCallback(const rm_msgs::DbusData::ConstPtr& data) override;
void actionFeedbackCallback(const rm_msgs::EngineerFeedbackConstPtr& feedback);
void actionDoneCallback(const actionlib::SimpleClientGoalState& state, const rm_msgs::EngineerResultConstPtr& result);
void runStepQueue(const std::string& step_queue_name);
void judgePrefix();
void judgeRoot();
void initMode();
void enterServo();
void actionActiveCallback()
{
operating_mode_ = MIDDLEWARE;
}
void remoteControlTurnOff() override;
void chassisOutputOn() override;
void gimbalOutputOn() override;
void rightSwitchDownRise() override;
void rightSwitchMidRise() override;
void rightSwitchUpRise() override;
void leftSwitchUpRise() override;
void leftSwitchUpFall();
void leftSwitchDownFall();
void leftSwitchDownRise() override;
void ctrlQPress();
void ctrlWPress();
void ctrlEPress();
void ctrlAPress();
void ctrlSPress();
void ctrlZPress();
void ctrlZPressing();
void ctrlZRelease();
void ctrlXPress();
void ctrlCPress();
void ctrlDPress();
Expand All @@ -97,9 +104,11 @@ class EngineerManual : public ChassisGimbalManual
void shiftBPress();
void shiftBRelease();
void shiftGPress();
void shiftRPress();
void shiftRPressing();
void shiftRRelease();
void shiftVPress();
void shiftVRelease();
void shiftFPress();
void rPress();
void qPressing();
void qRelease();
Expand All @@ -114,37 +123,47 @@ class EngineerManual : public ChassisGimbalManual
void bRelease();
void vPressing();
void vRelease();
void fPressing();
void fPress();
void fRelease();
void gPressing();
void gPress();
void gRelease();

void mouseLeftRelease();
void mouseRightRelease();
void gpioStateCallback(const rm_msgs::GpioData::ConstPtr& data);
void stoneNumCallback(const std_msgs::String ::ConstPtr& data);

int state_;
rm_msgs::EngineerUi engineer_ui_;
double angular_z_scale_{}, gyro_scale_{}, fast_gyro_scale_{}, low_gyro_scale_{}, normal_gyro_scale_{},
exchange_gyro_scale_{}, fast_speed_scale_{}, low_speed_scale_{}, normal_speed_scale_{}, exchange_speed_scale_{};
;
std::string prefix_, root_, reversal_state_;
int operating_mode_{}, servo_mode_{}, gimbal_mode_{}, stone_num_{}, gripper_state_{}, drag_state_{};
std::map<std::string, int> prefix_list_, root_list_;
// Servo
void updateServo(const rm_msgs::DbusData::ConstPtr& dbus_data);

int checkJointsLimit();

ros::Time last_time_;
ros::Subscriber reversal_vision_sub_;
ros::Publisher engineer_ui_pub_;
bool reversal_motion_{}, change_flag_{}, is_random_ore_{}, reverse_high_{ false };
int operating_mode_{}, servo_mode_{}, gimbal_mode_{};
std::vector<std::string> stone_num_{};
double angular_z_scale_{};
double fast_speed_scale_{}, normal_speed_scale_{}, low_speed_scale_{}, exchange_speed_scale_{};
double gyro_scale_{}, fast_gyro_scale_{}, normal_gyro_scale_{}, low_gyro_scale_{}, exchange_gyro_scale_{};
std::string prefix_{}, root_{}, drag_state_{ "off" }, max_temperature_joint_{}, joint_temperature_{},
reversal_state_{}, gripper_state_{};

ros::Publisher exchanger_update_pub_, engineer_ui_pub_;
ros::Subscriber gripper_state_sub_, stone_num_sub_;
actionlib::SimpleActionClient<rm_msgs::EngineerAction> action_client_;
rm_common::CalibrationQueue *power_on_calibration_{}, *arm_calibration_{};

auto_exchange::AutoExchange* auto_exchange_;
rm_msgs::GpioData gpio_state_;
rm_msgs::EngineerUi engineer_ui_;
rm_common::Vel3DCommandSender* servo_command_sender_;
rm_common::MultiDofCommandSender* reversal_command_sender_;
rm_common::ServiceCallerBase<std_srvs::Empty>* servo_reset_caller_;
rm_common::JointPositionBinaryCommandSender *drag_command_sender_, *joint7_command_sender_;
rm_common::CalibrationQueue *calibration_gather_{}, *pitch_calibration_;
InputEvent left_switch_up_event_, left_switch_down_event_, ctrl_q_event_, ctrl_a_event_, ctrl_z_event_, ctrl_w_event_,
ctrl_s_event_, ctrl_x_event_, ctrl_e_event_, ctrl_d_event_, ctrl_c_event_, ctrl_b_event_, ctrl_v_event_, z_event_,
q_event_, e_event_, x_event_, c_event_, v_event_, b_event_, f_event_, shift_z_event_, shift_x_event_,
shift_c_event_, shift_v_event_, shift_b_event_, shift_g_event_, ctrl_r_event_, shift_q_event_, shift_e_event_,
ctrl_g_event_, shift_r_event_, ctrl_f_event_, shift_event_, g_event_, r_event_, mouse_left_event_,
shift_c_event_, shift_v_event_, shift_b_event_, shift_g_event_, ctrl_r_event_, shift_q_event_, shift_f_event_,
shift_e_event_, ctrl_g_event_, shift_r_event_, ctrl_f_event_, shift_event_, g_event_, r_event_, mouse_left_event_,
mouse_right_event_;
};

} // namespace rm_manual
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>engineer_middleware</depend>
<depend>sensor_msgs</depend>
<depend>rm_msgs</depend>
<depend>rm_common</depend>
Expand Down
8 changes: 4 additions & 4 deletions src/chassis_gimbal_manual.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ void ChassisGimbalManual::checkKeyboard(const rm_msgs::DbusData::ConstPtr& dbus_
ManualBase::checkKeyboard(dbus_data);
if (robot_id_ == rm_msgs::GameRobotStatus::RED_ENGINEER || robot_id_ == rm_msgs::GameRobotStatus::BLUE_ENGINEER)
{
w_event_.update((!dbus_data->key_ctrl) && (!dbus_data->key_shift) && dbus_data->key_w);
s_event_.update((!dbus_data->key_ctrl) && (!dbus_data->key_shift) && dbus_data->key_s);
a_event_.update((!dbus_data->key_ctrl) && (!dbus_data->key_shift) && dbus_data->key_a);
d_event_.update((!dbus_data->key_ctrl) && (!dbus_data->key_shift) && dbus_data->key_d);
w_event_.update((!dbus_data->key_ctrl) && dbus_data->key_w);
s_event_.update((!dbus_data->key_ctrl) && dbus_data->key_s);
a_event_.update((!dbus_data->key_ctrl) && dbus_data->key_a);
d_event_.update((!dbus_data->key_ctrl) && dbus_data->key_d);
}
else
{
Expand Down
Loading