Files
2026-01-17 14:06:59 +08:00

15 lines
773 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# shoot
## 工作流程
初始化3个电机和一个舵机,包括发射的2个m3508,拨盘的m2006和弹仓盖上的舵机(双开门舵机可能要换成2个)。m2006初始化时设置为速度闭环,防止上电乱转。订阅shoot_cmd话题(robot_cmd发布的)并发布shoot_feed话题(robot_cmd会订阅)。
1. 从shoot_cmd获取消息
2. 根据工作模式确定是否急停
3. 如果之前是单发模式或3发模式并且冷却时间没到,直接结束本次任务,等待下一次进入
4. 如果已经冷却完成,根据发来的拨盘模式,设定m2006的闭环类型和参考值
5. 根据发来的弹速数据,设定摩擦轮的参考值
6. 根据发来的弹舱数据进行开合
7. 设定反馈数据,推送到shoot_feed话题