running sample rt systems

✏️ Edit this page on GitHub

#contents

Preparation

Windows

Installing RTCs

The following RTCs are used in some of the sample RT systems and must be installed.

DirectInputRTC

This RTC is used to operate the system with a joystick.

Download and run the installer from the following site:

JoystickToVelocity

This RTC converts the pos output (TimedLongSeq type) from the DirectInputRTC OutPort into the TimedVelocity2D type.

Download and run the installer from the following site:

FloatSeqToVelocity

FloatSeqToVelocity is an RTC that converts the output (TimedFloatSeq type) of the TkJoyStick sample included with OpenRTM-aist-Python into TimedVelocity2D and outputs it through an OutPort.

Download it from here.

FloatSeqToVelocity
InPort
Name Data Type Description
in TimeFloatSeq Input data before conversion
OutPort
Name Data Type Description
in TimedVelocity2D Converted output data
Configuration Parameters
Name Default Value Description
rotation_by_position -0.02 Angular velocity corresponding to the joystick X position
velocity_by_position 0.002 Forward velocity corresponding to the joystick Y position

Script Files

These script files automate RTC startup and RT system restoration.

Download them from here.

Starting the Name Server and RT System Editor

Windows

First, start the Name Server and RT System Editor on Windows.

For detailed instructions, refer to this page.

ev3dev

The downloaded package from the Bulk Installation section contains an rtc.conf file.

Modify the following line in rtc.conf by replacing ppp.pp.pp.ppp with the IP address of the Windows machine.

corba.nameservers: ppp.pp.pp.ppp

This allows components started on EV3 to be registered with the Name Server running on Windows.

To check the Windows IP address, enter:

ipconfig

Starting RTCs

Windows

The downloaded script package from the Script Files section contains a batch file named start_component.bat.

Executing it starts the following RTCs.

  • This batch file is intended for 64-bit Windows and 32-bit OpenRTM-aist.
  • For 32-bit Windows, use start_component_32.bat.
  • If you are using the 64-bit version of OpenRTM-aist, use start_component_64.bat.

If the Python installation directory is not included in the PATH environment variable, TkJoyStick cannot be started. In that case, please start it manually by following the instructions on this page.

ev3dev

Execute start_rtc.sh contained in the package downloaded from the Bulk Installation section.

cd RaspberryPiMouseRTSystem_script_Raspbian
sh start_rtc.sh

The following RTCs will start:

ControlEducatorVehicle0
EducatorVehicle0

Restoring and Starting the RT System

On Windows, execute JoystickControlEV3_resurrect.bat located in the JoystickControlEV3 folder of the downloaded package from the Script Files section.

This performs tasks such as:

  • Connecting data ports
  • Setting configuration parameters

Next, execute JoystickControlEV3_activate.bat to activate the RTCs.

JoystickControlEV3 is an RT system that controls the EV3 using a joystick component.

To deactivate the system, execute:

JoystickControlEV3_stop.bat

To disconnect the ports, execute:

JoystickControlEV3_teardown.bat

Sample Details

For samples other than JoystickControlEV3:

  • ****_resurrect.bat : Restore RT system
  • ****_activate.bat : Activate RTCs
  • ****_stop.bat : Deactivate RTCs
  • ****_teardown.bat : Disconnect ports
File Name Description
`****_resurrect.bat` Restore RT system
`****_activate.bat` Activate RTCs
`****_stop.bat` Deactivate RTCs
`****_teardown.bat` Disconnect ports

GamePadSimpleControlEV3

This sample RT system controls the Educator Vehicle in the direction indicated by the analog stick of a gamepad.

Connect a gamepad to the Windows PC before starting the system.

JoystickSimpleControlEV3

This sample RT system controls the Educator Vehicle in the direction indicated by the TkJoyStick sample component included with OpenRTM-aist-Python.

GamePadControlEV3

In addition to controlling the Educator Vehicle using a gamepad’s analog stick, this sample RT system performs control using the touch sensor, ultrasonic sensor, and color sensor.

JoystickControlEV3

In addition to controlling the Educator Vehicle using the TkJoyStick sample component included with OpenRTM-aist-Python, this sample RT system performs control using the touch sensor, ultrasonic sensor, and color sensor.