经过几个小时的奋战,小蜘蛛终于流畅的在地上爬了~
废话不说,上视频咯
- 2014-9-8 更新
a. 更新cerebel,修正了几个错误,删除了ACTION_CFG宏,增加了DEF_ACTION宏
b. 增加了视频
Spider_Go_Front.part1.rar
(10 MB, 下载次数: 3747)
2014-9-8 18:06 上传
点击文件名下载附件
Spider_Go_Front.part2.rar
(10 MB, 下载次数: 4148)
2014-9-8 18:07 上传
点击文件名下载附件
Spider_Go_Front.part3.rar
(9.37 MB, 下载次数: 3736)
2014-9-8 18:07 上传
点击文件名下载附件
c. 增加了向前走的动作定义,其实向后走就是把里面几个Action的动作反过来
- #define DELTA_DEGREE_XY 23
- #define DELTA_DEGREE_XZ 45
- #define LEFT_FRONT_LEG_0_RST (180 - DELTA_DEGREE_XY)
- #define LEFT_MIDDLE_LEG_0_RST 180
- #define LEFT_BACK_LEG_0_RST (180 + DELTA_DEGREE_XY)
- #define RIGHT_FRONT_LEG_0_RST (0 + DELTA_DEGREE_XY)
- #define RIGHT_MIDDLE_LEG_0_RST 0
- #define RIGHT_BACK_LEG_0_RST (0 - DELTA_DEGREE_XY)
- #define LEFT_LEG_1_RST 180
- #define RIGHT_LEG_1_RST 0
- #define LEFT_LEG_2_RST 90
- #define RIGHT_LEG_2_RST 90
- #define LEFT_LEG_UP (LEFT_LEG_1_RST + DELTA_DEGREE_XZ)
- #define LEFT_LEG_DOWN LEFT_LEG_1_RST
- #define RIGHT_LEG_UP (RIGHT_LEG_1_RST - DELTA_DEGREE_XZ)
- #define RIGHT_LEG_DOWN RIGHT_LEG_1_RST
- #define SPIDER_SPEED 2
- DEF_ACTION(Spider_Go_Front)
- //! middle state A
- ACTION(
- ALL_LEGS_MSK ,
- true, //!< start automatically
- SPIDER_SPEED, //!< Use 1s
- {
- [LEFT_FRONT_LEG_0] = LEFT_FRONT_LEG_0_RST,
- [LEFT_MIDDLE_LEG_0] = LEFT_MIDDLE_LEG_0_RST,
- [LEFT_BACK_LEG_0] = LEFT_BACK_LEG_0_RST,
- [RIGHT_FRONT_LEG_0] = RIGHT_FRONT_LEG_0_RST,
- [RIGHT_MIDDLE_LEG_0] = RIGHT_MIDDLE_LEG_0_RST,
- [RIGHT_BACK_LEG_0] = RIGHT_BACK_LEG_0_RST,
- [LEFT_FRONT_LEG_1] = LEFT_LEG_UP,
- [LEFT_MIDDLE_LEG_1] = LEFT_LEG_DOWN,
- [LEFT_BACK_LEG_1] = LEFT_LEG_UP,
- [RIGHT_FRONT_LEG_1] = RIGHT_LEG_DOWN,
- [RIGHT_MIDDLE_LEG_1] = RIGHT_LEG_UP,
- [RIGHT_BACK_LEG_1] = RIGHT_LEG_DOWN,
- [LEFT_FRONT_LEG_2] = LEFT_LEG_2_RST,
- [LEFT_MIDDLE_LEG_2] = LEFT_LEG_2_RST,
- [LEFT_BACK_LEG_2] = LEFT_LEG_2_RST,
- [RIGHT_FRONT_LEG_2] = RIGHT_LEG_2_RST,
- [RIGHT_MIDDLE_LEG_2] = RIGHT_LEG_2_RST,
- [RIGHT_BACK_LEG_2] = RIGHT_LEG_2_RST,
- }
- ),
- ACTION(
- ALL_LEGS_MSK ,
- true, //!< start automatically
- SPIDER_SPEED, //!< Use 1s
- {
- [LEFT_FRONT_LEG_0] = LEFT_FRONT_LEG_0_RST - DELTA_DEGREE_XY,
- [LEFT_MIDDLE_LEG_0] = LEFT_MIDDLE_LEG_0_RST + DELTA_DEGREE_XY,
- [LEFT_BACK_LEG_0] = LEFT_BACK_LEG_0_RST - DELTA_DEGREE_XY,
- [RIGHT_FRONT_LEG_0] = RIGHT_FRONT_LEG_0_RST - DELTA_DEGREE_XY,
- [RIGHT_MIDDLE_LEG_0] = RIGHT_MIDDLE_LEG_0_RST + DELTA_DEGREE_XY,
- [RIGHT_BACK_LEG_0] = RIGHT_BACK_LEG_0_RST - DELTA_DEGREE_XY,
- [LEFT_FRONT_LEG_1] = LEFT_LEG_DOWN,
- [LEFT_MIDDLE_LEG_1] = LEFT_LEG_DOWN,
- [LEFT_BACK_LEG_1] = LEFT_LEG_DOWN,
- [RIGHT_FRONT_LEG_1] = RIGHT_LEG_DOWN,
- [RIGHT_MIDDLE_LEG_1] = RIGHT_LEG_DOWN,
- [RIGHT_BACK_LEG_1] = RIGHT_LEG_DOWN,
- [LEFT_FRONT_LEG_2] = LEFT_LEG_2_RST,
- [LEFT_MIDDLE_LEG_2] = LEFT_LEG_2_RST,
- [LEFT_BACK_LEG_2] = LEFT_LEG_2_RST,
- [RIGHT_FRONT_LEG_2] = RIGHT_LEG_2_RST,
- [RIGHT_MIDDLE_LEG_2] = RIGHT_LEG_2_RST,
- [RIGHT_BACK_LEG_2] = RIGHT_LEG_2_RST,
- }
- ),
- //! middle state B:
- ACTION(
- ALL_LEGS_MSK ,
- true, //!< start automatically
- SPIDER_SPEED, //!< Use 1s
- {
- [LEFT_FRONT_LEG_0] = LEFT_FRONT_LEG_0_RST,
- [LEFT_MIDDLE_LEG_0] = LEFT_MIDDLE_LEG_0_RST,
- [LEFT_BACK_LEG_0] = LEFT_BACK_LEG_0_RST,
- [RIGHT_FRONT_LEG_0] = RIGHT_FRONT_LEG_0_RST,
- [RIGHT_MIDDLE_LEG_0] = RIGHT_MIDDLE_LEG_0_RST,
- [RIGHT_BACK_LEG_0] = RIGHT_BACK_LEG_0_RST,
- [LEFT_FRONT_LEG_1] = LEFT_LEG_DOWN,
- [LEFT_MIDDLE_LEG_1] = LEFT_LEG_UP,
- [LEFT_BACK_LEG_1] = LEFT_LEG_DOWN,
- [RIGHT_FRONT_LEG_1] = RIGHT_LEG_UP,
- [RIGHT_MIDDLE_LEG_1] = RIGHT_LEG_DOWN,
- [RIGHT_BACK_LEG_1] = RIGHT_LEG_UP,
- [LEFT_FRONT_LEG_2] = LEFT_LEG_2_RST,
- [LEFT_MIDDLE_LEG_2] = LEFT_LEG_2_RST,
- [LEFT_BACK_LEG_2] = LEFT_LEG_2_RST,
- [RIGHT_FRONT_LEG_2] = RIGHT_LEG_2_RST,
- [RIGHT_MIDDLE_LEG_2] = RIGHT_LEG_2_RST,
- [RIGHT_BACK_LEG_2] = RIGHT_LEG_2_RST,
- }
- ),
- ACTION(
- ALL_LEGS_MSK ,
- true, //!< start automatically
- SPIDER_SPEED, //!< Use 1s
- {
-
- [LEFT_FRONT_LEG_0] = LEFT_FRONT_LEG_0_RST + DELTA_DEGREE_XY,
- [LEFT_MIDDLE_LEG_0] = LEFT_MIDDLE_LEG_0_RST - DELTA_DEGREE_XY,
- [LEFT_BACK_LEG_0] = LEFT_BACK_LEG_0_RST + DELTA_DEGREE_XY,
- [RIGHT_FRONT_LEG_0] = RIGHT_FRONT_LEG_0_RST + DELTA_DEGREE_XY,
- [RIGHT_MIDDLE_LEG_0] = RIGHT_MIDDLE_LEG_0_RST - DELTA_DEGREE_XY,
- [RIGHT_BACK_LEG_0] = RIGHT_BACK_LEG_0_RST + DELTA_DEGREE_XY,
- [LEFT_FRONT_LEG_1] = LEFT_LEG_DOWN,
- [LEFT_MIDDLE_LEG_1] = LEFT_LEG_DOWN,
- [LEFT_BACK_LEG_1] = LEFT_LEG_DOWN,
- [RIGHT_FRONT_LEG_1] = RIGHT_LEG_DOWN,
- [RIGHT_MIDDLE_LEG_1] = RIGHT_LEG_DOWN,
- [RIGHT_BACK_LEG_1] = RIGHT_LEG_DOWN,
- [LEFT_FRONT_LEG_2] = LEFT_LEG_2_RST,
- [LEFT_MIDDLE_LEG_2] = LEFT_LEG_2_RST,
- [LEFT_BACK_LEG_2] = LEFT_LEG_2_RST,
- [RIGHT_FRONT_LEG_2] = RIGHT_LEG_2_RST,
- [RIGHT_MIDDLE_LEG_2] = RIGHT_LEG_2_RST,
- [RIGHT_BACK_LEG_2] = RIGHT_LEG_2_RST,
- }
- ),
- END_DEF_ACTION(Spider_Go_Front)
-
复制代码
工程下载
SpiderRobot_Template(v1.0).rar
(1.48 MB, 下载次数: 726)
2014-9-8 18:10 上传
点击文件名下载附件
中秋节快乐,第三个TOWER是我的啦,捏哈哈哈哈哈哈~
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
不,我是团队作战
一周热门 更多>