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

Method Init

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

Source from the content-addressed store, hash-verified

84}
85
86void Custom::Init()
87{
88 InitLowCmd();
89 /*create publisher*/
90 lowcmd_publisher.reset(new ChannelPublisher<unitree_go::msg::dds_::LowCmd_>(TOPIC_LOWCMD));
91 lowcmd_publisher->InitChannel();
92
93 /*create subscriber*/
94 lowstate_subscriber.reset(new ChannelSubscriber<unitree_go::msg::dds_::LowState_>(TOPIC_LOWSTATE));
95 lowstate_subscriber->InitChannel(std::bind(&Custom::LowStateMessageHandler, this, std::placeholders::_1), 1);
96
97 /*loop publishing thread*/
98 lowCmdWriteThreadPtr = CreateRecurrentThreadEx("writebasiccmd", UT_CPU_ID_NONE, int(dt * 1000000), &Custom::LowCmdWrite, this);
99}
100
101void Custom::InitLowCmd()
102{

Callers 5

stand_go2.pyFile · 0.80
mainFunction · 0.80
UnitreeSdk2BridgeThreadFunction · 0.80
__init__Method · 0.80

Calls 1

resetMethod · 0.45

Tested by

no test coverage detected