Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | Static Private Attributes | List of all members
PyBody Class Reference

#include <PyBody.h>

Inheritance diagram for PyBody:
Inheritance graph
[legend]

Public Types

enum  { STRUCTURE, KINEMATICS }
 
- Public Types inherited from BodyRTC
enum  emg_reason { EMG_NONE, EMG_SERVO_ERROR, EMG_FZ }
 
- Public Types inherited from hrp::Body
enum  ExtraJointType
 
- Public Types inherited from RTC::RTObject_impl
typedef ExecutionContextActionListener ECActionListener
 
typedef ExecutionContextActionListenerType ECActionListenerType
 
typedef PostComponentActionListener PostCompActionListener
 
typedef PostComponentActionListenerType PostCompActionListenerType
 
typedef PreComponentActionListener PreCompActionListener
 
typedef PreComponentActionListenerType PreCompActionListenerType
 

Public Member Functions

PyObject * calcCM ()
 
void calcForwardKinematics ()
 
std::string getName ()
 
PyObject * getPosition ()
 
PyObject * getPosture ()
 
PyObject * getRotation ()
 
PyLinkjoint (int i)
 
PyObject * joints ()
 
PyLinklink (std::string name)
 
PyObject * links ()
 
void notifyChanged (int change)
 
 PyBody (RTC::Manager *manager=&RTC::Manager::instance())
 
PyLinkrootLink ()
 
void setListener (PySimulator *i_sim)
 
void setPosition (PyObject *v)
 
void setPosture (PyObject *v)
 
void setRotation (PyObject *v)
 
virtual ~PyBody ()
 
- Public Member Functions inherited from BodyRTC
int addJointGroup (const char *gname, const std::vector< int >jids)
 
 BodyRTC (RTC::Manager *manager=&RTC::Manager::instance())
 
bool checkEmergency (emg_reason &o_reason, int &o_id)
 
void createInPort (const std::string &config)
 
void createOutPort (const std::string &config)
 
std::vector< intgetJointGroup (const char *gname)
 
void getStatus (OpenHRP::RobotHardwareService::RobotState *rs)
 
void getStatus2 (OpenHRP::RobotHardwareService::RobotState2 *rs)
 
int lengthDigitalInput ()
 
int lengthDigitalOutput ()
 
bool names2ids (const std::vector< std::string > &i_names, std::vector< int > &o_ids)
 
RTC::ReturnCode_t onActivated (RTC::UniqueId ec_id)
 
RTC::ReturnCode_t onDeactivated (RTC::UniqueId ec_id)
 
bool postOneStep ()
 
bool power (int jid, bool turnon)
 
bool power (const char *jname, bool turnon)
 
bool preOneStep ()
 
int readCalibState (const int i)
 
void readDataPorts ()
 
bool readDigitalInput (char *o_din)
 
bool readDigitalOutput (char *o_dout)
 
int readPowerState (const int i)
 
int readServoState (const int i)
 
bool resetPosition ()
 
bool servo (const char *jname, bool turnon)
 
bool servo (int jid, bool turnon)
 
bool setServoErrorLimit (const char *i_jname, double i_limit)
 
RTC::ReturnCode_t setup ()
 
void writeDataPorts (double time)
 
bool writeDigitalOutput (const char *i_dout)
 
bool writeDigitalOutputWithMask (const char *i_dout, const char *i_mask)
 
virtual ~BodyRTC (void)
 
- Public Member Functions inherited from hrp::Body
void addSensor (Sensor *sensor, int sensorType, int id)
 
 Body ()
 
 Body (const Body &org)
 
void calcAngularMomentumJacobian (Link *base, dmatrix &H)
 
Vector3 calcCM ()
 
void calcCMJacobian (Link *base, dmatrix &J)
 
void calcForwardKinematics (bool calcVelocity=false, bool calcAcceleration=false)
 
void calcInverseDynamics (Link *link, Vector3 &out_f, Vector3 &out_tau)
 
void calcMassMatrix (dmatrix &out_M)
 
double calcTotalMass ()
 
void calcTotalMomentum (Vector3 &out_P, Vector3 &out_L)
 
void calcTotalMomentumFromJacobian (Vector3 &out_P, Vector3 &out_L)
 
void clearExternalForces ()
 
void clearSensorValues ()
 
LightcreateLight (Link *link, int lightType, const std::string &name)
 
SensorcreateSensor (Link *link, int sensorType, int id, const std::string &name)
 
void getDefaultRootPosition (Vector3 &out_p, Matrix33 &out_R)
 
JointPathPtr getJointPath (Link *baseLink, Link *targetLink)
 
void initializeConfiguration ()
 
bool installCustomizer ()
 
bool installCustomizer (BodyCustomizerInterface *customizerInterface)
 
bool isStaticModel ()
 
Linkjoint (int id) const
 
const std::vector< Link * > & joints () const
 
Lightlight (const std::string &name)
 
Linklink (int index) const
 
Linklink (const std::string &name) const
 
const LinkTraverselinks () const
 
const LinkTraverselinkTraverse () const
 
const std::string & modelName ()
 
const std::string & name ()
 
unsigned int numJoints () const
 
unsigned int numLinks () const
 
unsigned int numSensors (int sensorType) const
 
unsigned int numSensorTypes () const
 
void putInformation (std::ostream &out)
 
LinkrootLink () const
 
Sensorsensor (int sensorType, int sensorId) const
 
TSensor * sensor (const std::string &name) const
 
TSensor * sensor (int id) const
 
void setColumnOfMassMatrix (dmatrix &M, int column)
 
void setDefaultRootPosition (const Vector3 &p, const Matrix33 &R)
 
void setModelName (const std::string &name)
 
void setName (const std::string &name)
 
void setRootLink (Link *link)
 
void setVirtualJointForces ()
 
double totalMass () const
 
void updateLinkColdetModelPositions ()
 
void updateLinkTree ()
 
virtual ~Body ()
 
- Public Member Functions inherited from hrp::Referenced
 Referenced ()
 
virtual ~Referenced ()
 
- Public Member Functions inherited from RTC::DataFlowComponentBase
 DataFlowComponentBase (Manager *manager)
 
void init ()
 
virtual ~DataFlowComponentBase (void)
 
- Public Member Functions inherited from RTC::RTObject_impl
ReturnCode_t activate (RTC::UniqueId ec_id)
 
void addConfigurationParamListener (ConfigurationParamListenerType type, ConfigurationParamListener *listener, bool autoclean=true)
 
ConfigurationParamListeneraddConfigurationParamListener (ConfigurationParamListenerType listener_type, Listener &obj, void(Listener::*memfunc)(const char *, const char *))
 
void addConfigurationSetListener (ConfigurationSetListenerType type, ConfigurationSetListener *listener, bool autoclean=true)
 
ConfigurationSetListeneraddConfigurationSetListener (ConfigurationSetListenerType listener_type, Listener &obj, void(Listener::*memfunc)(const coil::Properties &config_set))
 
void addConfigurationSetNameListener (ConfigurationSetNameListenerType type, ConfigurationSetNameListener *listener, bool autoclean=true)
 
ConfigurationSetNameListeneraddConfigurationSetNameListener (ConfigurationSetNameListenerType type, Listener &obj, void(Listener::*memfunc)(const char *))
 
void addExecutionContextActionListener (ECActionListenerType listener_type, ECActionListener *listener, bool autoclean=true)
 
ECActionListeneraddExecutionContextActionListener (ECActionListenerType listener_type, Listener &obj, void(Listener::*memfunc)(UniqueId))
 
bool addInPort (const char *name, InPortBase &inport)
 
bool addOutPort (const char *name, OutPortBase &outport)
 
bool addPort (PortBase &port)
 
bool addPort (PortService_ptr port)
 
bool addPort (CorbaPort &port)
 
PortActionListeneraddPortActionListener (PortActionListenerType listener_type, Listener &obj, void(Listener::*memfunc)(const RTC::PortProfile &))
 
void addPortActionListener (PortActionListenerType listener_type, PortActionListener *listener, bool autoclean=true)
 
void addPortConnectListener (PortConnectListenerType listener_type, PortConnectListener *listener, bool autoclean=true)
 
PortConnectListeneraddPortConnectListener (PortConnectListenerType listener_type, Listener &obj, void(Listener::*memfunc)(const char *, ConnectorProfile &))
 
void addPortConnectRetListener (PortConnectRetListenerType listener_type, PortConnectRetListener *listener, bool autoclean=true)
 
PortConnectRetListeneraddPortConnectRetListener (PortConnectRetListenerType listener_type, Listener &obj, void(Listener::*memfunc)(const char *, ConnectorProfile &, ReturnCode_t))
 
void addPostComponentActionListener (PostComponentActionListenerType listener_type, PostComponentActionListener *listener, bool autoclean=true)
 
PostComponentActionListeneraddPostComponentActionListener (PostCompActionListenerType listener_type, Listener &obj, void(Listener::*memfunc)(UniqueId ec_id, ReturnCode_t ret))
 
void addPreComponentActionListener (PreComponentActionListenerType listener_type, PreComponentActionListener *listener, bool autoclean=true)
 
PreComponentActionListeneraddPreComponentActionListener (PreCompActionListenerType listener_type, Listener &obj, void(Listener::*memfunc)(UniqueId ec_id))
 
bool addSdoServiceConsumer (const SDOPackage::ServiceProfile &prof)
 
bool addSdoServiceProvider (const SDOPackage::ServiceProfile &prof, SdoServiceProviderBase *provider)
 
UniqueId attach_context (ExecutionContext_ptr exec_context)
 
UniqueId bindContext (ExecutionContext_ptr exec_context)
 
bool bindParameter (const char *param_name, VarType &var, const char *def_val, bool(*trans)(VarType &, const char *)=coil::stringTo)
 
ReturnCode_t deactivate (RTC::UniqueId ec_id)
 
void deletePort (PortService_ptr port)
 
void deletePort (CorbaPort &port)
 
void deletePort (PortBase &port)
 
void deletePortByName (const char *port_name)
 
ReturnCode_t detach_context (UniqueId exec_handle)
 
virtual ReturnCode_t exit ()
 
virtual ReturnCode_t finalize ()
 
void finalizeContexts ()
 
void finalizePorts ()
 
virtual ComponentProfile * get_component_profile ()
 
virtual SDOPackage::Configuration_ptr get_configuration ()
 
virtual ExecutionContext_ptr get_context (UniqueId exec_handle)
 
virtual ExecutionContextHandle_t get_context_handle (ExecutionContext_ptr cxt)
 
virtual SDOPackage::DeviceProfile * get_device_profile ()
 
virtual SDOPackage::Monitoring_ptr get_monitoring ()
 
virtual SDOPackage::OrganizationList * get_organizations ()
 
virtual ExecutionContextListget_owned_contexts ()
 
virtual SDOPackage::OrganizationList * get_owned_organizations ()
 
virtual ExecutionContextListget_participating_contexts ()
 
virtual PortServiceListget_ports ()
 
virtual char * get_sdo_id ()
 
virtual SDOPackage::SDOService_ptr get_sdo_service (const char *id)
 
virtual char * get_sdo_type ()
 
virtual SDOPackage::ServiceProfile * get_service_profile (const char *id)
 
virtual SDOPackage::ServiceProfileList * get_service_profiles ()
 
virtual CORBA::Any * get_status (const char *name)
 
virtual SDOPackage::NVListget_status_list ()
 
const char * getCategory ()
 
const char * getDescription ()
 
ExecutionContext_ptr getExecutionContext (RTC::UniqueId ec_id)
 
double getExecutionRate (RTC::UniqueId ec_id)
 
const char * getInstanceName ()
 
std::vector< std::string > getNamingNames ()
 
RTObject_ptr getObjRef () const
 
coil::PropertiesgetProperties ()
 
const char * getTypeName ()
 
const char * getVendor ()
 
const char * getVersion ()
 
virtual ReturnCode_t initialize ()
 
virtual CORBA::Boolean is_alive (ExecutionContext_ptr exec_context)
 
bool isOwnExecutionContext (RTC::UniqueId ec_id)
 
virtual ReturnCode_t on_aborting (UniqueId exec_handle)
 
virtual ReturnCode_t on_activated (UniqueId exec_handle)
 
virtual ReturnCode_t on_deactivated (UniqueId exec_handle)
 
virtual ReturnCode_t on_error (UniqueId exec_handle)
 
virtual ReturnCode_t on_execute (UniqueId exec_handle)
 
virtual ReturnCode_t on_finalize ()
 
virtual ReturnCode_t on_initialize ()
 
virtual ReturnCode_t on_rate_changed (UniqueId exec_handle)
 
virtual ReturnCode_t on_reset (UniqueId exec_handle)
 
virtual ReturnCode_t on_shutdown (UniqueId exec_handle)
 
virtual ReturnCode_t on_startup (UniqueId exec_handle)
 
virtual ReturnCode_t on_state_update (UniqueId exec_handle)
 
bool readAll ()
 
void registerInPort (const char *name, InPortBase &inport)
 
void registerOutPort (const char *name, OutPortBase &outport)
 
void registerPort (PortBase &port)
 
void registerPort (PortService_ptr port)
 
void registerPort (CorbaPort &port)
 
void removeConfigurationParamListener (ConfigurationParamListenerType type, ConfigurationParamListener *listener)
 
void removeConfigurationSetListener (ConfigurationSetListenerType type, ConfigurationSetListener *listener)
 
void removeConfigurationSetNameListener (ConfigurationSetNameListenerType type, ConfigurationSetNameListener *listener)
 
void removeExecutionContextActionListener (ECActionListenerType listener_type, ECActionListener *listener)
 
bool removeInPort (InPortBase &port)
 
bool removeOutPort (OutPortBase &port)
 
bool removePort (PortService_ptr port)
 
bool removePort (CorbaPort &port)
 
bool removePort (PortBase &port)
 
void removePortActionListener (PortActionListenerType listener_type, PortActionListener *listener)
 
void removePortConnectListener (PortConnectListenerType listener_type, PortConnectListener *listener)
 
void removePortConnectRetListener (PortConnectRetListenerType listener_type, PortConnectRetListener *listener)
 
void removePostComponentActionListener (PostComponentActionListenerType listener_type, PostComponentActionListener *listener)
 
void removePreComponentActionListener (PreComponentActionListenerType listener_type, PreComponentActionListener *listener)
 
bool removeSdoServiceConsumer (const char *id)
 
bool removeSdoServiceProvider (const char *id)
 
ReturnCode_t reset (RTC::UniqueId ec_id)
 
 RTObject_impl (CORBA::ORB_ptr orb, PortableServer::POA_ptr poa)
 
 RTObject_impl (Manager *manager)
 
ReturnCode_t setExecutionRate (RTC::UniqueId ec_id, double rate)
 
void setInstanceName (const char *instance_name)
 
void setObjRef (const RTObject_ptr rtobj)
 
void setProperties (const coil::Properties &prop)
 
void setReadAll (bool read=true, bool completion=false)
 
void setWriteAll (bool write=true, bool completion=false)
 
void updateParameters (const char *config_set)
 
bool writeAll ()
 
virtual ~RTObject_impl (void)
 
- Public Member Functions inherited from GLbody
void computeAABB (hrp::Vector3 &o_min, hrp::Vector3 &o_max)
 
void divideLargeTriangles (double maxEdgeLen)
 
size_t draw ()
 
void draw ()
 
void drawSensor (hrp::Sensor *i_sensor)
 
GLcamerafindCamera (const char *i_name)
 
GLcamerafindCamera (const char *i_name)
 
GLcamerafindCamera (const char *i_name)
 
virtual const irr::core::aabbox3d< irr::f32 > & getBoundingBox () const
 
boost::function2< void, hrp::Body *, hrp::Sensor * > getSensorDrawCallback ()
 
 GLbody ()
 
 GLbody (irr::scene::ISceneNode *i_parent, irr::scene::ISceneManager *i_mgr, irr::s32 i_id, OpenHRP::BodyInfo_var i_binfo)
 
 GLbody (OpenHRP::BodyInfo_var i_binfo)
 
virtual void render ()
 
void setPosition (double x, double y, double z)
 
template<class T >
void setPosition (const T &p)
 
void setPosture (const double *i_angles)
 
void setPosture (const double *i_angles, double *i_pos, double *i_rpy)
 
void setPosture (const hrp::dvector &i_q, const hrp::Vector3 &i_p, const hrp::Matrix33 &i_R)
 
void setPosture (double *i_angles, double *i_pos, double *i_rpy)
 
void setPosture (double *i_angles, double *i_pos, double *i_rpy)
 
void setRotation (const double *R)
 
void setRotation (double r, double p, double y)
 
void setSensorDrawCallback (boost::function2< void, hrp::Body *, hrp::Sensor * > f)
 
 ~GLbody ()
 
 ~GLbody ()
 

Static Public Member Functions

static void moduleInit (RTC::Manager *)
 
- Static Public Member Functions inherited from BodyRTC
static void moduleInit (RTC::Manager *)
 
- Static Public Member Functions inherited from hrp::Body
static BodyInterfacebodyInterface ()
 
- Static Public Member Functions inherited from GLbody
static void useAbsTransformToDraw ()
 

Private Attributes

PySimulatorsimulator
 

Static Private Attributes

static const char * pybody_spec []
 

Additional Inherited Members

- Public Attributes inherited from BodyRTC
int m_emergencyId
 
BodyRTC::emg_reason m_emergencyReason
 
std::vector< double > m_servoErrorLimit
 
- Public Attributes inherited from hrp::Body
 EJ_XY
 
 EJ_XYZ
 
 EJ_Z
 
std::vector< ExtraJointextraJoints
 
- Protected Member Functions inherited from hrp::Referenced
int refCounter ()
 
- Protected Member Functions inherited from RTC::RTObject_impl
virtual ReturnCode_t onAborting (RTC::UniqueId exec_handle)
 
void onAddPort (const PortProfile &pprof)
 
void onAttachExecutionContext (UniqueId ec_id)
 
void onDetachExecutionContext (UniqueId ec_id)
 
virtual ReturnCode_t onError (RTC::UniqueId exec_handle)
 
virtual ReturnCode_t onExecute (RTC::UniqueId exec_handle)
 
virtual ReturnCode_t onFinalize ()
 
virtual ReturnCode_t onInitialize ()
 
virtual ReturnCode_t onRateChanged (RTC::UniqueId exec_handle)
 
void onRemovePort (const PortProfile &pprof)
 
virtual ReturnCode_t onReset (RTC::UniqueId exec_handle)
 
virtual ReturnCode_t onShutdown (RTC::UniqueId exec_handle)
 
virtual ReturnCode_t onStartup (RTC::UniqueId exec_handle)
 
virtual ReturnCode_t onStateUpdate (RTC::UniqueId exec_handle)
 
void postOnAborting (UniqueId ec_id, ReturnCode_t ret)
 
void postOnActivated (UniqueId ec_id, ReturnCode_t ret)
 
void postOnDeactivated (UniqueId ec_id, ReturnCode_t ret)
 
void postOnError (UniqueId ec_id, ReturnCode_t ret)
 
void postOnExecute (UniqueId ec_id, ReturnCode_t ret)
 
void postOnFinalize (UniqueId ec_id, ReturnCode_t ret)
 
void postOnInitialize (UniqueId ec_id, ReturnCode_t ret)
 
void postOnRateChanged (UniqueId ec_id, ReturnCode_t ret)
 
void postOnReset (UniqueId ec_id, ReturnCode_t ret)
 
void postOnShutdown (UniqueId ec_id, ReturnCode_t ret)
 
void postOnStartup (UniqueId ec_id, ReturnCode_t ret)
 
void postOnStateUpdate (UniqueId ec_id, ReturnCode_t ret)
 
void preOnAborting (UniqueId ec_id)
 
void preOnActivated (UniqueId ec_id)
 
void preOnDeactivated (UniqueId ec_id)
 
void preOnError (UniqueId ec_id)
 
void preOnExecute (UniqueId ec_id)
 
void preOnFinalize (UniqueId ec_id)
 
void preOnInitialize (UniqueId ec_id)
 
void preOnRateChanged (UniqueId ec_id)
 
void preOnReset (UniqueId ec_id)
 
void preOnShutdown (UniqueId ec_id)
 
void preOnStartup (UniqueId ec_id)
 
void preOnStateUpdate (UniqueId ec_id)
 
void shutdown ()
 
- Protected Attributes inherited from RTC::RTObject_impl
ComponentActionListeners m_actionListeners
 
ConfigAdmin m_configsets
 
bool m_created
 
std::vector< ExecutionContextBase * > m_eclist
 
ExecutionContextServiceList m_ecMine
 
ExecutionContextServiceList m_ecOther
 
bool m_exiting
 
std::vector< InPortBase * > m_inports
 
RTObject_var m_objref
 
std::vector< OutPortBase * > m_outports
 
Managerm_pManager
 
CORBA::ORB_var m_pORB
 
PortAdmin m_portAdmin
 
PortConnectListeners m_portconnListeners
 
PortableServer::POA_var m_pPOA
 
ComponentProfile m_profile
 
coil::Properties m_properties
 
SDOPackage::Configuration_var m_pSdoConfig
 
SDOPackage::Configuration_implm_pSdoConfigImpl
 
bool m_readAll
 
bool m_readAllCompletion
 
SDOPackage::OrganizationList m_sdoOrganizations
 
SDOPackage::OrganizationList m_sdoOwnedOrganizations
 
SdoServiceAdmin m_sdoservice
 
SDOPackage::NVList m_sdoStatus
 
bool m_writeAll
 
bool m_writeAllCompletion
 
Logger rtclog
 

Detailed Description

Definition at line 8 of file PyBody.h.

Member Enumeration Documentation

anonymous enum
Enumerator
STRUCTURE 
KINEMATICS 

Definition at line 11 of file PyBody.h.

Constructor & Destructor Documentation

PyBody::PyBody ( RTC::Manager manager = &RTC::Manager::instance())

Definition at line 26 of file PyBody.cpp.

PyBody::~PyBody ( )
virtual

Definition at line 30 of file PyBody.cpp.

Member Function Documentation

PyObject * PyBody::calcCM ( )

Definition at line 120 of file PyBody.cpp.

void PyBody::calcForwardKinematics ( )

Definition at line 76 of file PyBody.cpp.

std::string PyBody::getName ( void  )

Definition at line 115 of file PyBody.cpp.

PyObject * PyBody::getPosition ( )

Definition at line 55 of file PyBody.cpp.

PyObject * PyBody::getPosture ( )

Definition at line 65 of file PyBody.cpp.

PyObject * PyBody::getRotation ( )

Definition at line 60 of file PyBody.cpp.

PyLink * PyBody::joint ( int  i)

Definition at line 101 of file PyBody.cpp.

PyObject * PyBody::joints ( )

Definition at line 105 of file PyBody.cpp.

PyLink * PyBody::link ( std::string  name)

Definition at line 86 of file PyBody.cpp.

PyObject * PyBody::links ( )

Definition at line 91 of file PyBody.cpp.

void PyBody::moduleInit ( RTC::Manager manager)
static

Definition at line 153 of file PyBody.cpp.

void PyBody::notifyChanged ( int  change)

Definition at line 130 of file PyBody.cpp.

PyLink * PyBody::rootLink ( )

Definition at line 81 of file PyBody.cpp.

void PyBody::setListener ( PySimulator i_sim)

Definition at line 143 of file PyBody.cpp.

void PyBody::setPosition ( PyObject *  v)

Definition at line 35 of file PyBody.cpp.

void PyBody::setPosture ( PyObject *  v)

Definition at line 45 of file PyBody.cpp.

void PyBody::setRotation ( PyObject *  v)

Definition at line 40 of file PyBody.cpp.

Member Data Documentation

const char * PyBody::pybody_spec
staticprivate
Initial value:
=
{
"implementation_id", "PyBody",
"type_name", "PyBody",
"description", "PyBody component",
"version", "0.1",
"vendor", "AIST",
"category", "Generic",
"activity_type", "DataFlowComponent",
"max_instance", "10",
"language", "C++",
"lang_type", "compile",
""
}

Definition at line 34 of file PyBody.h.

PySimulator* PyBody::simulator
private

Definition at line 35 of file PyBody.h.


The documentation for this class was generated from the following files:


hrpsys
Author(s): AIST, Fumio Kanehiro
autogenerated on Thu May 6 2021 02:41:53