MCPcopy Create free account
hub / github.com/TeleHuman/TextOp / Custom

Class Custom

TextOpDeploy/src/unitree_mujoco/example/cpp/stand_go2.cpp:21–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19constexpr double VelStopF = (16000.0f);
20
21class Custom
22{
23public:
24 Custom(){};
25 ~Custom(){};
26 void Init();
27
28private:
29 void InitLowCmd();
30 void LowStateMessageHandler(const void *messages);
31 void LowCmdWrite();
32
33private:
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
54uint32_t crc32_core(uint32_t *ptr, uint32_t len)
55{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected