| 19 | constexpr double VelStopF = (16000.0f); |
| 20 | |
| 21 | class Custom |
| 22 | { |
| 23 | public: |
| 24 | Custom(){}; |
| 25 | ~Custom(){}; |
| 26 | void Init(); |
| 27 | |
| 28 | private: |
| 29 | void InitLowCmd(); |
| 30 | void LowStateMessageHandler(const void *messages); |
| 31 | void LowCmdWrite(); |
| 32 | |
| 33 | private: |
| 34 | double stand_up_joint_pos[12] = {0.00571868, 0.608813, -1.21763, -0.00571868, 0.608813, -1.21763, |
| 35 | 0.00571868, 0.608813, -1.21763, -0.00571868, 0.608813, -1.21763}; |
| 36 | double stand_down_joint_pos[12] = {0.0473455, 1.22187, -2.44375, -0.0473455, 1.22187, -2.44375, 0.0473455, |
| 37 | 1.22187, -2.44375, -0.0473455, 1.22187, -2.44375}; |
| 38 | double dt = 0.002; |
| 39 | double runing_time = 0.0; |
| 40 | double phase = 0.0; |
| 41 | |
| 42 | unitree_go::msg::dds_::LowCmd_ low_cmd{}; // default init |
| 43 | unitree_go::msg::dds_::LowState_ low_state{}; // default init |
| 44 | |
| 45 | /*publisher*/ |
| 46 | ChannelPublisherPtr<unitree_go::msg::dds_::LowCmd_> lowcmd_publisher; |
| 47 | /*subscriber*/ |
| 48 | ChannelSubscriberPtr<unitree_go::msg::dds_::LowState_> lowstate_subscriber; |
| 49 | |
| 50 | /*LowCmd write thread*/ |
| 51 | ThreadPtr lowCmdWriteThreadPtr; |
| 52 | }; |
| 53 | |
| 54 | uint32_t crc32_core(uint32_t *ptr, uint32_t len) |
| 55 | { |
nothing calls this directly
no outgoing calls
no test coverage detected