// Generated by gencpp from file unitree_legged_msgs/MotorCmd.msg
// DO NOT EDIT!


#ifndef UNITREE_LEGGED_MSGS_MESSAGE_MOTORCMD_H
#define UNITREE_LEGGED_MSGS_MESSAGE_MOTORCMD_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>


namespace unitree_legged_msgs
{
template <class ContainerAllocator>
struct MotorCmd_
{
  typedef MotorCmd_<ContainerAllocator> Type;

  MotorCmd_()
    : mode(0)
    , q(0.0)
    , dq(0.0)
    , tau(0.0)
    , Kp(0.0)
    , Kd(0.0)
    , reserve()  {
      reserve.assign(0);
  }
  MotorCmd_(const ContainerAllocator& _alloc)
    : mode(0)
    , q(0.0)
    , dq(0.0)
    , tau(0.0)
    , Kp(0.0)
    , Kd(0.0)
    , reserve()  {
  (void)_alloc;
      reserve.assign(0);
  }



   typedef uint8_t _mode_type;
  _mode_type mode;

   typedef float _q_type;
  _q_type q;

   typedef float _dq_type;
  _dq_type dq;

   typedef float _tau_type;
  _tau_type tau;

   typedef float _Kp_type;
  _Kp_type Kp;

   typedef float _Kd_type;
  _Kd_type Kd;

   typedef boost::array<uint32_t, 3>  _reserve_type;
  _reserve_type reserve;





  typedef boost::shared_ptr< ::unitree_legged_msgs::MotorCmd_<ContainerAllocator> > Ptr;
  typedef boost::shared_ptr< ::unitree_legged_msgs::MotorCmd_<ContainerAllocator> const> ConstPtr;

}; // struct MotorCmd_

typedef ::unitree_legged_msgs::MotorCmd_<std::allocator<void> > MotorCmd;

typedef boost::shared_ptr< ::unitree_legged_msgs::MotorCmd > MotorCmdPtr;
typedef boost::shared_ptr< ::unitree_legged_msgs::MotorCmd const> MotorCmdConstPtr;

// constants requiring out of line definition



template<typename ContainerAllocator>
std::ostream& operator<<(std::ostream& s, const ::unitree_legged_msgs::MotorCmd_<ContainerAllocator> & v)
{
ros::message_operations::Printer< ::unitree_legged_msgs::MotorCmd_<ContainerAllocator> >::stream(s, "", v);
return s;
}


template<typename ContainerAllocator1, typename ContainerAllocator2>
bool operator==(const ::unitree_legged_msgs::MotorCmd_<ContainerAllocator1> & lhs, const ::unitree_legged_msgs::MotorCmd_<ContainerAllocator2> & rhs)
{
  return lhs.mode == rhs.mode &&
    lhs.q == rhs.q &&
    lhs.dq == rhs.dq &&
    lhs.tau == rhs.tau &&
    lhs.Kp == rhs.Kp &&
    lhs.Kd == rhs.Kd &&
    lhs.reserve == rhs.reserve;
}

template<typename ContainerAllocator1, typename ContainerAllocator2>
bool operator!=(const ::unitree_legged_msgs::MotorCmd_<ContainerAllocator1> & lhs, const ::unitree_legged_msgs::MotorCmd_<ContainerAllocator2> & rhs)
{
  return !(lhs == rhs);
}


} // namespace unitree_legged_msgs

namespace ros
{
namespace message_traits
{





template <class ContainerAllocator>
struct IsFixedSize< ::unitree_legged_msgs::MotorCmd_<ContainerAllocator> >
  : TrueType
  { };

template <class ContainerAllocator>
struct IsFixedSize< ::unitree_legged_msgs::MotorCmd_<ContainerAllocator> const>
  : TrueType
  { };

template <class ContainerAllocator>
struct IsMessage< ::unitree_legged_msgs::MotorCmd_<ContainerAllocator> >
  : TrueType
  { };

template <class ContainerAllocator>
struct IsMessage< ::unitree_legged_msgs::MotorCmd_<ContainerAllocator> const>
  : TrueType
  { };

template <class ContainerAllocator>
struct HasHeader< ::unitree_legged_msgs::MotorCmd_<ContainerAllocator> >
  : FalseType
  { };

template <class ContainerAllocator>
struct HasHeader< ::unitree_legged_msgs::MotorCmd_<ContainerAllocator> const>
  : FalseType
  { };


template<class ContainerAllocator>
struct MD5Sum< ::unitree_legged_msgs::MotorCmd_<ContainerAllocator> >
{
  static const char* value()
  {
    return "bbb3b7d91319c3a1b99055f0149ba221";
  }

  static const char* value(const ::unitree_legged_msgs::MotorCmd_<ContainerAllocator>&) { return value(); }
  static const uint64_t static_value1 = 0xbbb3b7d91319c3a1ULL;
  static const uint64_t static_value2 = 0xb99055f0149ba221ULL;
};

template<class ContainerAllocator>
struct DataType< ::unitree_legged_msgs::MotorCmd_<ContainerAllocator> >
{
  static const char* value()
  {
    return "unitree_legged_msgs/MotorCmd";
  }

  static const char* value(const ::unitree_legged_msgs::MotorCmd_<ContainerAllocator>&) { return value(); }
};

template<class ContainerAllocator>
struct Definition< ::unitree_legged_msgs::MotorCmd_<ContainerAllocator> >
{
  static const char* value()
  {
    return "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"
;
  }

  static const char* value(const ::unitree_legged_msgs::MotorCmd_<ContainerAllocator>&) { return value(); }
};

} // namespace message_traits
} // namespace ros

namespace ros
{
namespace serialization
{

  template<class ContainerAllocator> struct Serializer< ::unitree_legged_msgs::MotorCmd_<ContainerAllocator> >
  {
    template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
    {
      stream.next(m.mode);
      stream.next(m.q);
      stream.next(m.dq);
      stream.next(m.tau);
      stream.next(m.Kp);
      stream.next(m.Kd);
      stream.next(m.reserve);
    }

    ROS_DECLARE_ALLINONE_SERIALIZER
  }; // struct MotorCmd_

} // namespace serialization
} // namespace ros

namespace ros
{
namespace message_operations
{

template<class ContainerAllocator>
struct Printer< ::unitree_legged_msgs::MotorCmd_<ContainerAllocator> >
{
  template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::unitree_legged_msgs::MotorCmd_<ContainerAllocator>& v)
  {
    s << indent << "mode: ";
    Printer<uint8_t>::stream(s, indent + "  ", v.mode);
    s << indent << "q: ";
    Printer<float>::stream(s, indent + "  ", v.q);
    s << indent << "dq: ";
    Printer<float>::stream(s, indent + "  ", v.dq);
    s << indent << "tau: ";
    Printer<float>::stream(s, indent + "  ", v.tau);
    s << indent << "Kp: ";
    Printer<float>::stream(s, indent + "  ", v.Kp);
    s << indent << "Kd: ";
    Printer<float>::stream(s, indent + "  ", v.Kd);
    s << indent << "reserve[]" << std::endl;
    for (size_t i = 0; i < v.reserve.size(); ++i)
    {
      s << indent << "  reserve[" << i << "]: ";
      Printer<uint32_t>::stream(s, indent + "  ", v.reserve[i]);
    }
  }
};

} // namespace message_operations
} // namespace ros

#endif // UNITREE_LEGGED_MSGS_MESSAGE_MOTORCMD_H
