25 "implementation_id",
"JoystickController",
26 "type_name",
"JoystickController",
27 "description",
"Controller to drive a mobile robot",
30 "category",
"OpenHRP Controller",
31 "activity_type",
"DataFlowComponent",
34 "lang_type",
"compile",
42 m_angleIn(
"angle", m_angle),
43 m_velocityIn(
"velocity", m_velocity),
44 m_commandIn(
"command", m_command),
45 m_torqueOut(
"torque", m_torque),
129 double steerAngle =
m_angle.data[0];
135 double steerCommandAngle = 3.14159 * -0.5 *
m_command.data[0] / 180.0;
136 double tireCommandVel =
m_command.data[1] / 10;
139 double steerCommandTorque = 20.0 * (steerCommandAngle - steerAngle) - 2.0 * steerVel;
142 double tireCommandTorque = 1.0 * (tireCommandVel - tireVel);
145 m_torque.data[0] = steerCommandTorque;
146 m_torque.data[1] = tireCommandTorque;
147 m_torque.data[2] = tireCommandTorque;
148 m_torque.data[3] = tireCommandTorque;
198 RTC::Create<JoystickController>,
199 RTC::Delete<JoystickController>);
png_infop png_charpp int png_charpp profile
JoystickController(RTC::Manager *manager)
virtual RTC::ReturnCode_t onInitialize()
TimedDoubleSeq m_velocity
bool addOutPort(const char *name, OutPortBase &outport)
static const char * joystickcontroller_spec[]
Controller to drive a mobile robot.
InPort< TimedFloatSeq > m_commandIn
ExecutionContextHandle_t UniqueId
InPort< TimedDoubleSeq > m_angleIn
virtual RTC::ReturnCode_t onExecute(RTC::UniqueId ec_id)
void JoystickControllerInit(RTC::Manager *manager)
OutPort< TimedDoubleSeq > m_torqueOut
virtual bool write(DataType &value)
bool addInPort(const char *name, InPortBase &inport)
bool registerFactory(coil::Properties &profile, RtcNewFunc new_func, RtcDeleteFunc delete_func)
InPort< TimedDoubleSeq > m_velocityIn