27 #define NAME_ARMGROUP "_armgroup" 33 const std::string& name,
const int* mode)
34 :
DensoBase(parent, service, handle, name, mode),
60 DensoVariable_Vec::iterator itVar;
65 (*itVar)->StartService(node);
81 DensoVariable_Vec::iterator itVar;
86 (*itVar)->StopService();
94 boost::mutex::scoped_lock lockSrv(
m_mtxSrv);
97 DensoVariable_Vec::iterator itVar;
160 const PoseData &pose,
VARIANT &vnt)
164 (((pose.exjoints.mode != 0) && (pose.exjoints.joints.size() > 0)) ? 1 : 0);
173 for(i = 0; i < num; i++) {
179 std::copy(pose.value.begin(), pose.value.end(), pfltval);
184 pvntval[i].
lVal = pose.type;
188 pvntval[i].
lVal = pose.pass;
202 const ExJoints &exjoints,
VARIANT &vnt)
205 uint32_t num = 1 + exjoints.joints.size();
213 for(i = 0; i < num; i++) {
216 pvntval[0].
lVal = exjoints.mode;
222 pjntval[0].
lVal = exjoints.joints.at(i-1).joint;
224 pjntval[1].
fltVal = exjoints.joints.at(i-1).value;
void ChangeArmGroup(int number)
HRESULT SafeArrayUnaccessData(SAFEARRAY *psa)
const XMLElement * FirstChildElement(const char *name=0) const
virtual HRESULT InitializeBCAP()
SAFEARRAY * SafeArrayCreateVector(uint16_t vt, int32_t lLbound, uint32_t cElements)
HRESULT AddVariable(int32_t get_id, const std::string &name, std::vector< boost::shared_ptr< class DensoVariable > > &vecVar, int16_t vt=VT_EMPTY, bool bRead=false, bool bWrite=false, bool bID=false, int iDuration=BCAP_VAR_DEFAULT_DURATION)
Subscriber subscribe(const std::string &topic, uint32_t queue_size, void(T::*fp)(M), T *obj, const TransportHints &transport_hints=TransportHints())
const XMLElement * NextSiblingElement(const char *name=0) const
Get the next (right) sibling element of this node, with an optionally supplied name.
HRESULT AddVariable(const std::string &name)
DensoRobot(DensoBase *parent, Service_Vec &service, Handle_Vec &handle, const std::string &name, const int *mode)
void Callback_ArmGroup(const Int32::ConstPtr &msg)
ros::Subscriber m_subArmGroup
std::vector< uint32_t > Handle_Vec
std::vector< BCAPService_Ptr > Service_Vec
HRESULT SafeArrayAccessData(SAFEARRAY *psa, void **ppvData)
DensoVariable_Vec m_vecVar
HRESULT CreateExJoints(const ExJoints &exjoints, VARIANT &vnt)
#define ID_ROBOT_GETVARIABLE
HRESULT get_Object(const std::vector< boost::shared_ptr< DensoBase > > &vecBase, int index, boost::shared_ptr< DensoBase > *obj)
HRESULT get_Variable(const std::string &name, DensoVariable_Ptr *var)
#define XML_VARIABLE_NAME
virtual HRESULT StartService(ros::NodeHandle &node)
std::vector< DensoBase_Ptr > DensoBase_Vec
virtual HRESULT StopService()
std::string RosName() const
HRESULT CreatePoseData(const PoseData &pose, VARIANT &vnt)