init
This commit is contained in:
21
arm/src/joint_enable_control.cpp
Normal file
21
arm/src/joint_enable_control.cpp
Normal file
@@ -0,0 +1,21 @@
|
||||
#include <unitree/robot/channel/channel_publisher.hpp>
|
||||
#include <unitree/common/time/time_tool.hpp>
|
||||
#include "msg/ArmString_.hpp"
|
||||
|
||||
#define TOPIC "rt/arm_Command"
|
||||
|
||||
using namespace unitree::robot;
|
||||
using namespace unitree::common;
|
||||
|
||||
int main()
|
||||
{
|
||||
ChannelFactory::Instance()->Init(0);
|
||||
ChannelPublisher<unitree_arm::msg::dds_::ArmString_> publisher(TOPIC);
|
||||
publisher.InitChannel();
|
||||
|
||||
unitree_arm::msg::dds_::ArmString_ msg{};
|
||||
msg.data_() = "{\"seq\":4,\"address\":1,\"funcode\":5,\"data\":{\"mode\":0}}";
|
||||
publisher.Write(msg);
|
||||
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user