Download
latest Releases : 2.0.0-RELESE
2.0.0-RELESE | Download page |
Number of Projects
RT-Component | 152 |
RT-Middleware | 33 |
Tools | 22 |
Documentation | 2 |
Choreonoid
Motion editor/Dynamics simulator
OpenHRP3
Dynamics simulator
OpenRTP
Integrated Development Platform
AIST RTC collection
RT-Components collection by AIST
TORK
Tokyo Opensource Robotics Association
DAQ-Middleware
Middleware for DAQ (Data Aquisition) by KEK
Implement the component activities
The Flip component will take image data received at its InPort, copy it into an image buffer, and use the cvFlip() function from OpenCV to transform it. The transformed data will be transmitted over the component's OutPort.
The process flow of onActivated(), onExecute() and onDeactivated() is illustrated in Figure 19.
The processing performed by onExecute() is illustrated in Figure 20.
Copy the user property sheet for OpenCV
A property sheet defines the various options (such as install path, library paths and extra link libraries) and macros necessary to compile using Visual Studio. Both RTCBuilder and rtc-template generate VC projects when they generate component templates. The generated VC project uses a property sheet to specify various options. It can also include a user-defined property sheet for any extra user-defined options.Copy the user_config.vsprops file given below into the Flip component's folder, or save the downloadable version into the component's folder.
user_config.vsprops
※ The user_config.vsprops file that already exists in the Flip folder can be overwritten.
Execute copyprops.bat
Upon executing copyprops.bat, the rtm_config.vsprops file will be copied to the component folder. The rtm_config.vsprops file contains settings such as the include path and extra link libraries necessary to compile an RT-Component using Visual C++.
Edit the header file
Edit the source file
Implement onActivated(), onDeactivated() and onExecute() as below.
Build the component
Build the component as in Figure 21.
Test the component
For testing, the Flip component will be connected to the USBCameraAcquireComp and USBCameraMonitorComp sample components supplied with OpenRTM-aist.
Start the name service
The omniORB name service must be started. From the Start menu, go to All Programs > OpenRTM-aist > C++ > examples > Start Naming Service.
Write rtc.conf
The rtc.conf file is used to tell an RT-Component such parameters as the address of the name server, the format to use when registering with the name server, etc. Copy the following lines into a file called "rtc.conf" and place that file in Flip\FlipComp\Debug or Flip\FlipComp\Release.
Start the Flip component
In the same folder that the rtc.conf file was placed, execute FlipComp.exe.
Start the USBCameraAqcuire and USBCameraMonitor components
The USBCameraAcquire component provides image data captured from a USB camera over its OutPort. The USBCameraMonitor component displays image data received over its InPort. Start them by selecting the following options from the Start menu:
Start > All Programs > OpenRTM-aist > C++ > examples > USBCameraAcquireComp / USBCameraMonitorCpomp
Connect the components
Using RTSystemEditor, connect the three components as in Figure 22.
Changing the Flip component configuration parameters
The Flip component's configuration parameters can be changed as in Figure 23. For example, when using the Elecom UCAM-DLM 130HWH USB camera, set image_height and image_width as below.
Do the same for the USBCameraMonitor component.
Activate the components
Click the "All" icon in the toolbar for RTSystemEditor. All the components will be activated. If all components started succesfully, RTSystemEditor should resemble Figure 24.
Test
Try changing the Flip component's "flip_mode" configuration parameter to different values of -1, 0 and 1. The displayed image should change accordingly.
Flip component source file
Flip component header file
Flip component prebuilt package
A prebuilt package of the component can be downloaded from here. Remove the underscore from the name and decompress the file.