======================================================================
  RTComponent: Odometry specificatioin

  OpenRTM-aist-1.0.0
  Date: $Date$

  @author Yusuke Nakajima (y.nakajima@aist.go.jp)

  Copyright (c) 2008, National Institute of Advanced Industrial Science and Tec
  hnology (AIST). All rights reserved. This program is made available under the te
  rms of the Eclipse Public License v1.0 which accompanies this distribution, and 
  is available at http://www.eclipse.org/legal/epl-v10.html

  This file is generated by rtc-template with the following argments.

#   rtc-template -bcxx --module-name=Odometry 
#   --module-desc='detect position by Odometry' --module-version=4.0.0 --module-vendor=AIST INVENT 
#   --module-category=Localization --module-comp-type=STATIC 
#   --module-act-type=PERIODIC --module-max-inst=10 
#   --config=leftWheelID:int:0 --config=rightWheelID:int:1 --config=radiusOfLeftWheel:double:0.1 --config=radiusOfRightWheel:double:0.1 --config=lengthOfAxle:double:0.441 --config=radiusOfBodyArea:double:0.45 
#   --inport=CurrentWheelAngle:TimedDoubleSeq --inport=LocalizedPosition:IIS::TimedPosition --outport=OdometryPosition:IIS::TimedPosition 


======================================================================
    Basic Information
======================================================================
# <rtc-template block="module">
Module Name: Odometry
Description: detect position by Odometry
Version:     4.0.0
Vendor:      AIST INVENT
Category:    Localization
Kind:        DataFlowComponent
Comp. Type:  STATIC
Act. Type:   PERIODIC
MAX Inst.:   10
Lang:        C++
Lang Type:   

Overview:    (1)get current Wheel Angle data from MotorControlRTC
             (2)get current Robot's position data from LocalizationRTC
             (3)calculate current position by Odometry
             (4)send current odometry position data to LocalizationRTC
In/Out:      [INPUT]
               (1) current Angle data (encoder data)
               (2) current position data
             [OUTPUT]
               (1) Odometry's position data
# </rtc-template>


======================================================================
    Activity definition
======================================================================

[on_initialize]    implemented
	Description:   set Configuration parameters
	PreCondition:  none
	PostCondition: none

[on_finalize]

[on_startup]

[on_shutdown]

[on_activated]     implemented
	Description:   (1) update INPORT's data
	               (2) open files for debugging
	               (3) initialize
	PreCondition:  none
	PostCondition: none

[on_deactivated]   implemented
	Description:   (1)close files for debugging
	PreCondition:  none
	PostCondition: none

[on_execute]       implemented
	Description:   (1)get current Wheel Angle data from MotorControlRTC
	               (2)get current Robot's position data from LocalizationRTC
	               (3)calculate current position by Odometry
	               (4)send current odometry position data to LocalizationRTC
	PreCondition:  none
	PostCondition: none

[on_aborting]

[on_error]

[on_reset]

[on_state_update]

[on_rate_changed]

======================================================================
    InPorts definition
======================================================================
# <rtc-template block="inport">

	Name:        CurrentWheelAngle
	PortNumber:  0
	Description: current Wheel Angle data for Odometry
	PortType: 
	DataType:    TimedDoubleSeq
	MaxOut: 
	[Data Elements]
		Name:
		Type:            angle data: double,    timeStamp:tm
		Number:          angle data:2,  timeStamp:1
		Semantics:       current Wheel Angle data for Odometry
		                  [0]: left wheel's current data
		                  [1]: right wheel's current data
		Unit:            angle data : [rad],  timeStamp: [sec],[nanosec]
		Frequency:       
		Operation Cycle: 
		RangeLow:
		RangeHigh:
		DefaultValue:

	Name:        LocalizedPosition
	PortNumber:  1
	Description: current Localized Position data
	PortType: 
	DataType:    IIS::TimedPosition
	MaxOut: 
	[Data Elements]
		Name:
		Type:            localized Position data: double,    timeStamp:tm
		Number:          4 (x,y, posture angle) ,  timeStamp:1 ,id[] ,error[]
		Semantics:       current Localized Position data (the position of center of 
		                 robots model)
		                 [0]: X data
		                 [1]: Y data
		                 [2]: posture angle[rad]
		Unit:            X,Y data : [m],  Angle : [rad], timeStamp: [sec],[nanosec]
		Frequency:       
		Operation Cycle: 
		RangeLow:
		RangeHigh:
		DefaultValue:


# </rtc-template>

======================================================================
    OutPorts definition
======================================================================
# <rtc-template block="outport">

	Name:        OdometryPosition
	PortNumber:  0
	Description: current Odometry Position data
	PortType: 
	DataType:    IIS::TimedPosition
	MaxOut: 
	[Data Elements]
		Name:
		Type:            Odometry Position data: double,    timeStamp:tm
		Number:          4 (x,y, posture angle) ,  timeStamp:1 ,id[] ,error[]
		Semantics:       current Odometry Position data (the position of center of r
		                 obots model)
		                  [0]: X data
		                  [1]: Y data
		                  [2]: posture angle[rad]
		Unit:            X,Y data : [m],  Angle : [rad], timeStamp: [sec],[nanosec]
		Frequency:       
		Operation Cycle: 
		RangeLow:
		RangeHigh:
		DefaultValue:


# </rtc-template>


======================================================================
    Service Port definition
======================================================================
# <rtc-template block="serviceport">
# </rtc-template> 

======================================================================
    Configuration definition
======================================================================
# <rtc-template block="configuration">
	Configuration:
		Name:            leftWheelID leftWheelID
		Description:     ID number of left wheel of mobile robot.
		Type:            int
		DefaultValue:    0 0
		Unit:            none
		Range:           
		Constraint:      none

		Name:            rightWheelID rightWheelID
		Description:     ID number of right wheel of mobile robot.
		Type:            int
		DefaultValue:    1 1
		Unit:            none
		Range:           
		Constraint:      none

		Name:            radiusOfLeftWheel radiusOfLeftWheel
		Description:     radius of left wheel of mobile robot
		Type:            double
		DefaultValue:    0.1(RefHard2 model) 0.1
		Unit:            [m]
		Range:           
		Constraint:      none

		Name:            radiusOfRightWheel radiusOfRightWheel
		Description:     radius of right wheel of mobile robot
		Type:            double
		DefaultValue:    0.1(RefHard2 model) 0.1
		Unit:            [m]
		Range:           
		Constraint:      none

		Name:            lengthOfAxle lengthOfAxle
		Description:     length of axle (from left wheel to right wheel)
		Type:            double
		DefaultValue:    0.441(RefHard2 model) 0.441
		Unit:            [m]
		Range:           
		Constraint:      none

		Name:            radiusOfBodyArea radiusOfBodyArea
		Description:     length of body radius (from center of Axle to corner of Bod
		                 y)
		Type:            double
		DefaultValue:    0.45(RefHard2 model) 0.45
		Unit:            [m]
		Range:           
		Constraint:      

# </rtc-template> 
This area is reserved for future OpenRTM.

