349 lines
9.8 KiB
C
349 lines
9.8 KiB
C
|
// Generated by gencpp from file unitree_legged_msgs/LowCmd.msg
|
||
|
// DO NOT EDIT!
|
||
|
|
||
|
|
||
|
#ifndef UNITREE_LEGGED_MSGS_MESSAGE_LOWCMD_H
|
||
|
#define UNITREE_LEGGED_MSGS_MESSAGE_LOWCMD_H
|
||
|
|
||
|
|
||
|
#include <string>
|
||
|
#include <vector>
|
||
|
#include <map>
|
||
|
|
||
|
#include <ros/types.h>
|
||
|
#include <ros/serialization.h>
|
||
|
#include <ros/builtin_message_traits.h>
|
||
|
#include <ros/message_operations.h>
|
||
|
|
||
|
#include <unitree_legged_msgs/MotorCmd.h>
|
||
|
#include <unitree_legged_msgs/LED.h>
|
||
|
#include <unitree_legged_msgs/Cartesian.h>
|
||
|
|
||
|
namespace unitree_legged_msgs
|
||
|
{
|
||
|
template <class ContainerAllocator>
|
||
|
struct LowCmd_
|
||
|
{
|
||
|
typedef LowCmd_<ContainerAllocator> Type;
|
||
|
|
||
|
LowCmd_()
|
||
|
: levelFlag(0)
|
||
|
, commVersion(0)
|
||
|
, robotID(0)
|
||
|
, SN(0)
|
||
|
, bandWidth(0)
|
||
|
, motorCmd()
|
||
|
, led()
|
||
|
, wirelessRemote()
|
||
|
, reserve(0)
|
||
|
, crc(0)
|
||
|
, ff() {
|
||
|
wirelessRemote.assign(0);
|
||
|
}
|
||
|
LowCmd_(const ContainerAllocator& _alloc)
|
||
|
: levelFlag(0)
|
||
|
, commVersion(0)
|
||
|
, robotID(0)
|
||
|
, SN(0)
|
||
|
, bandWidth(0)
|
||
|
, motorCmd()
|
||
|
, led()
|
||
|
, wirelessRemote()
|
||
|
, reserve(0)
|
||
|
, crc(0)
|
||
|
, ff() {
|
||
|
(void)_alloc;
|
||
|
motorCmd.assign( ::unitree_legged_msgs::MotorCmd_<ContainerAllocator> (_alloc));
|
||
|
|
||
|
led.assign( ::unitree_legged_msgs::LED_<ContainerAllocator> (_alloc));
|
||
|
|
||
|
wirelessRemote.assign(0);
|
||
|
|
||
|
ff.assign( ::unitree_legged_msgs::Cartesian_<ContainerAllocator> (_alloc));
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
typedef uint8_t _levelFlag_type;
|
||
|
_levelFlag_type levelFlag;
|
||
|
|
||
|
typedef uint16_t _commVersion_type;
|
||
|
_commVersion_type commVersion;
|
||
|
|
||
|
typedef uint16_t _robotID_type;
|
||
|
_robotID_type robotID;
|
||
|
|
||
|
typedef uint32_t _SN_type;
|
||
|
_SN_type SN;
|
||
|
|
||
|
typedef uint8_t _bandWidth_type;
|
||
|
_bandWidth_type bandWidth;
|
||
|
|
||
|
typedef boost::array< ::unitree_legged_msgs::MotorCmd_<ContainerAllocator> , 20> _motorCmd_type;
|
||
|
_motorCmd_type motorCmd;
|
||
|
|
||
|
typedef boost::array< ::unitree_legged_msgs::LED_<ContainerAllocator> , 4> _led_type;
|
||
|
_led_type led;
|
||
|
|
||
|
typedef boost::array<uint8_t, 40> _wirelessRemote_type;
|
||
|
_wirelessRemote_type wirelessRemote;
|
||
|
|
||
|
typedef uint32_t _reserve_type;
|
||
|
_reserve_type reserve;
|
||
|
|
||
|
typedef uint32_t _crc_type;
|
||
|
_crc_type crc;
|
||
|
|
||
|
typedef boost::array< ::unitree_legged_msgs::Cartesian_<ContainerAllocator> , 4> _ff_type;
|
||
|
_ff_type ff;
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
typedef boost::shared_ptr< ::unitree_legged_msgs::LowCmd_<ContainerAllocator> > Ptr;
|
||
|
typedef boost::shared_ptr< ::unitree_legged_msgs::LowCmd_<ContainerAllocator> const> ConstPtr;
|
||
|
|
||
|
}; // struct LowCmd_
|
||
|
|
||
|
typedef ::unitree_legged_msgs::LowCmd_<std::allocator<void> > LowCmd;
|
||
|
|
||
|
typedef boost::shared_ptr< ::unitree_legged_msgs::LowCmd > LowCmdPtr;
|
||
|
typedef boost::shared_ptr< ::unitree_legged_msgs::LowCmd const> LowCmdConstPtr;
|
||
|
|
||
|
// constants requiring out of line definition
|
||
|
|
||
|
|
||
|
|
||
|
template<typename ContainerAllocator>
|
||
|
std::ostream& operator<<(std::ostream& s, const ::unitree_legged_msgs::LowCmd_<ContainerAllocator> & v)
|
||
|
{
|
||
|
ros::message_operations::Printer< ::unitree_legged_msgs::LowCmd_<ContainerAllocator> >::stream(s, "", v);
|
||
|
return s;
|
||
|
}
|
||
|
|
||
|
|
||
|
template<typename ContainerAllocator1, typename ContainerAllocator2>
|
||
|
bool operator==(const ::unitree_legged_msgs::LowCmd_<ContainerAllocator1> & lhs, const ::unitree_legged_msgs::LowCmd_<ContainerAllocator2> & rhs)
|
||
|
{
|
||
|
return lhs.levelFlag == rhs.levelFlag &&
|
||
|
lhs.commVersion == rhs.commVersion &&
|
||
|
lhs.robotID == rhs.robotID &&
|
||
|
lhs.SN == rhs.SN &&
|
||
|
lhs.bandWidth == rhs.bandWidth &&
|
||
|
lhs.motorCmd == rhs.motorCmd &&
|
||
|
lhs.led == rhs.led &&
|
||
|
lhs.wirelessRemote == rhs.wirelessRemote &&
|
||
|
lhs.reserve == rhs.reserve &&
|
||
|
lhs.crc == rhs.crc &&
|
||
|
lhs.ff == rhs.ff;
|
||
|
}
|
||
|
|
||
|
template<typename ContainerAllocator1, typename ContainerAllocator2>
|
||
|
bool operator!=(const ::unitree_legged_msgs::LowCmd_<ContainerAllocator1> & lhs, const ::unitree_legged_msgs::LowCmd_<ContainerAllocator2> & rhs)
|
||
|
{
|
||
|
return !(lhs == rhs);
|
||
|
}
|
||
|
|
||
|
|
||
|
} // namespace unitree_legged_msgs
|
||
|
|
||
|
namespace ros
|
||
|
{
|
||
|
namespace message_traits
|
||
|
{
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
template <class ContainerAllocator>
|
||
|
struct IsFixedSize< ::unitree_legged_msgs::LowCmd_<ContainerAllocator> >
|
||
|
: TrueType
|
||
|
{ };
|
||
|
|
||
|
template <class ContainerAllocator>
|
||
|
struct IsFixedSize< ::unitree_legged_msgs::LowCmd_<ContainerAllocator> const>
|
||
|
: TrueType
|
||
|
{ };
|
||
|
|
||
|
template <class ContainerAllocator>
|
||
|
struct IsMessage< ::unitree_legged_msgs::LowCmd_<ContainerAllocator> >
|
||
|
: TrueType
|
||
|
{ };
|
||
|
|
||
|
template <class ContainerAllocator>
|
||
|
struct IsMessage< ::unitree_legged_msgs::LowCmd_<ContainerAllocator> const>
|
||
|
: TrueType
|
||
|
{ };
|
||
|
|
||
|
template <class ContainerAllocator>
|
||
|
struct HasHeader< ::unitree_legged_msgs::LowCmd_<ContainerAllocator> >
|
||
|
: FalseType
|
||
|
{ };
|
||
|
|
||
|
template <class ContainerAllocator>
|
||
|
struct HasHeader< ::unitree_legged_msgs::LowCmd_<ContainerAllocator> const>
|
||
|
: FalseType
|
||
|
{ };
|
||
|
|
||
|
|
||
|
template<class ContainerAllocator>
|
||
|
struct MD5Sum< ::unitree_legged_msgs::LowCmd_<ContainerAllocator> >
|
||
|
{
|
||
|
static const char* value()
|
||
|
{
|
||
|
return "357432b2562edd0a8e89b9c9f5fc4821";
|
||
|
}
|
||
|
|
||
|
static const char* value(const ::unitree_legged_msgs::LowCmd_<ContainerAllocator>&) { return value(); }
|
||
|
static const uint64_t static_value1 = 0x357432b2562edd0aULL;
|
||
|
static const uint64_t static_value2 = 0x8e89b9c9f5fc4821ULL;
|
||
|
};
|
||
|
|
||
|
template<class ContainerAllocator>
|
||
|
struct DataType< ::unitree_legged_msgs::LowCmd_<ContainerAllocator> >
|
||
|
{
|
||
|
static const char* value()
|
||
|
{
|
||
|
return "unitree_legged_msgs/LowCmd";
|
||
|
}
|
||
|
|
||
|
static const char* value(const ::unitree_legged_msgs::LowCmd_<ContainerAllocator>&) { return value(); }
|
||
|
};
|
||
|
|
||
|
template<class ContainerAllocator>
|
||
|
struct Definition< ::unitree_legged_msgs::LowCmd_<ContainerAllocator> >
|
||
|
{
|
||
|
static const char* value()
|
||
|
{
|
||
|
return "uint8 levelFlag \n"
|
||
|
"uint16 commVersion # Old version Aliengo does not have\n"
|
||
|
"uint16 robotID # Old version Aliengo does not have\n"
|
||
|
"uint32 SN # Old version Aliengo does not have\n"
|
||
|
"uint8 bandWidth # Old version Aliengo does not have\n"
|
||
|
"MotorCmd[20] motorCmd\n"
|
||
|
"LED[4] led\n"
|
||
|
"uint8[40] wirelessRemote\n"
|
||
|
"uint32 reserve # Old version Aliengo does not have\n"
|
||
|
"uint32 crc\n"
|
||
|
"\n"
|
||
|
"Cartesian[4] ff # will delete # Old version Aliengo does not have\n"
|
||
|
"================================================================================\n"
|
||
|
"MSG: unitree_legged_msgs/MotorCmd\n"
|
||
|
"uint8 mode # motor target mode\n"
|
||
|
"float32 q # motor target position\n"
|
||
|
"float32 dq # motor target velocity\n"
|
||
|
"float32 tau # motor target torque\n"
|
||
|
"float32 Kp # motor spring stiffness coefficient\n"
|
||
|
"float32 Kd # motor damper coefficient\n"
|
||
|
"uint32[3] reserve # motor target torque\n"
|
||
|
"================================================================================\n"
|
||
|
"MSG: unitree_legged_msgs/LED\n"
|
||
|
"uint8 r\n"
|
||
|
"uint8 g\n"
|
||
|
"uint8 b\n"
|
||
|
"================================================================================\n"
|
||
|
"MSG: unitree_legged_msgs/Cartesian\n"
|
||
|
"float32 x\n"
|
||
|
"float32 y\n"
|
||
|
"float32 z\n"
|
||
|
;
|
||
|
}
|
||
|
|
||
|
static const char* value(const ::unitree_legged_msgs::LowCmd_<ContainerAllocator>&) { return value(); }
|
||
|
};
|
||
|
|
||
|
} // namespace message_traits
|
||
|
} // namespace ros
|
||
|
|
||
|
namespace ros
|
||
|
{
|
||
|
namespace serialization
|
||
|
{
|
||
|
|
||
|
template<class ContainerAllocator> struct Serializer< ::unitree_legged_msgs::LowCmd_<ContainerAllocator> >
|
||
|
{
|
||
|
template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
|
||
|
{
|
||
|
stream.next(m.levelFlag);
|
||
|
stream.next(m.commVersion);
|
||
|
stream.next(m.robotID);
|
||
|
stream.next(m.SN);
|
||
|
stream.next(m.bandWidth);
|
||
|
stream.next(m.motorCmd);
|
||
|
stream.next(m.led);
|
||
|
stream.next(m.wirelessRemote);
|
||
|
stream.next(m.reserve);
|
||
|
stream.next(m.crc);
|
||
|
stream.next(m.ff);
|
||
|
}
|
||
|
|
||
|
ROS_DECLARE_ALLINONE_SERIALIZER
|
||
|
}; // struct LowCmd_
|
||
|
|
||
|
} // namespace serialization
|
||
|
} // namespace ros
|
||
|
|
||
|
namespace ros
|
||
|
{
|
||
|
namespace message_operations
|
||
|
{
|
||
|
|
||
|
template<class ContainerAllocator>
|
||
|
struct Printer< ::unitree_legged_msgs::LowCmd_<ContainerAllocator> >
|
||
|
{
|
||
|
template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::unitree_legged_msgs::LowCmd_<ContainerAllocator>& v)
|
||
|
{
|
||
|
s << indent << "levelFlag: ";
|
||
|
Printer<uint8_t>::stream(s, indent + " ", v.levelFlag);
|
||
|
s << indent << "commVersion: ";
|
||
|
Printer<uint16_t>::stream(s, indent + " ", v.commVersion);
|
||
|
s << indent << "robotID: ";
|
||
|
Printer<uint16_t>::stream(s, indent + " ", v.robotID);
|
||
|
s << indent << "SN: ";
|
||
|
Printer<uint32_t>::stream(s, indent + " ", v.SN);
|
||
|
s << indent << "bandWidth: ";
|
||
|
Printer<uint8_t>::stream(s, indent + " ", v.bandWidth);
|
||
|
s << indent << "motorCmd[]" << std::endl;
|
||
|
for (size_t i = 0; i < v.motorCmd.size(); ++i)
|
||
|
{
|
||
|
s << indent << " motorCmd[" << i << "]: ";
|
||
|
s << std::endl;
|
||
|
s << indent;
|
||
|
Printer< ::unitree_legged_msgs::MotorCmd_<ContainerAllocator> >::stream(s, indent + " ", v.motorCmd[i]);
|
||
|
}
|
||
|
s << indent << "led[]" << std::endl;
|
||
|
for (size_t i = 0; i < v.led.size(); ++i)
|
||
|
{
|
||
|
s << indent << " led[" << i << "]: ";
|
||
|
s << std::endl;
|
||
|
s << indent;
|
||
|
Printer< ::unitree_legged_msgs::LED_<ContainerAllocator> >::stream(s, indent + " ", v.led[i]);
|
||
|
}
|
||
|
s << indent << "wirelessRemote[]" << std::endl;
|
||
|
for (size_t i = 0; i < v.wirelessRemote.size(); ++i)
|
||
|
{
|
||
|
s << indent << " wirelessRemote[" << i << "]: ";
|
||
|
Printer<uint8_t>::stream(s, indent + " ", v.wirelessRemote[i]);
|
||
|
}
|
||
|
s << indent << "reserve: ";
|
||
|
Printer<uint32_t>::stream(s, indent + " ", v.reserve);
|
||
|
s << indent << "crc: ";
|
||
|
Printer<uint32_t>::stream(s, indent + " ", v.crc);
|
||
|
s << indent << "ff[]" << std::endl;
|
||
|
for (size_t i = 0; i < v.ff.size(); ++i)
|
||
|
{
|
||
|
s << indent << " ff[" << i << "]: ";
|
||
|
s << std::endl;
|
||
|
s << indent;
|
||
|
Printer< ::unitree_legged_msgs::Cartesian_<ContainerAllocator> >::stream(s, indent + " ", v.ff[i]);
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
|
||
|
} // namespace message_operations
|
||
|
} // namespace ros
|
||
|
|
||
|
#endif // UNITREE_LEGGED_MSGS_MESSAGE_LOWCMD_H
|