Skip to content
 
 

Latest commit

 

History

120 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

edu_robot_control

Provides nodes, robot description for RViz and other tools for remote control of EduArt's robots for an easy monitoring and controlling.

Controlling the Robot Using Remote Control Node

With the provided ROS remote control node a gamepad or joystick can be used for controlling the robot. The default assignment for the controller is:

Axis DS5 Idle position Value range function
[0] Joystick L: left & right 0.0 1.0 to -1.0 Steering
[1] Joystick L: up & down 0.0 1.0 to -1.0 not in use
[2] L2 1.0 1.0 to -1.0 not in use
[3] Joystick R: left & right 0.0 1.0 to -1.0 not in use
[4] Joystick R: up & down 0.0 1.0 to -1.0 Throttle
[5] R2 1.0 1.0 to -1.0 not in use
[6] D-Pad: left & right 0.0 1.0 to -1.0 not in use
[7] D-Pad: up & down 0.0 1.0 to -1.0 not in use
Button DS5 Idle position Value range function
[0] Square 0 0 or 1 Switch to Skid Drive Kinematic
[1] Cross 0 0 or 1 Light pattern: Operation
[2] Circle 0 0 or 1 Switch to Mecanum Drive Kinematic
[3] Triangle 0 0 or 1 Light pattern: Operation
[4] L1 0 0 or 1 Light pattern: Turning left
[5] R1 0 0 or 1 Light pattern: Turning right
[6] L2 0 0 or 1 Switch into mode AUTONOMOUS (drives will be enabled and robot will subscribe to topic "autonomous/cmd_vel")
[7] R2 0 0 or 1 Override collision avoidance
[8] SHARE 0 0 or 1 Disable driving
[9] OPTIONS 0 0 or 1 Switch into mode REMOTE_CONTROLLED (drives will be enabled and robot will subscribe to topic "cmd_vel")
[10] PS 0 0 or 1 Connect Controller to Eduard
[11] L3 0 0 or 1 not in use
[12] R3 0 0 or 1 not in use
[13] Map 0 0 or 1 Light pattern: Warning light

and is defined in the parameter file "remote_control.yaml" located in the folder "parameter". Of course it can be reassigned to your needs.

Deploying

This software packages is usually deployed together with edu_robot.

Setting up your Joystick

A joystick can be used to operate Eduard. For this purpose, the robot must be extended by a Debian-compatible Bluetooth stick. PlayStation® 4 and PlayStation® 5 controllers were used, which are interpreted identically in their operating interface. The initial start-up of a Bluetooth controller follows.

Start the Bluetooth controller in the operating system:

$ bluetoothctl

Set up the controller and prepare for scanning:

$ agent on 
$ default-agent 
$ power on 
$ discoverable on 
$ pairable on

Put the PlayStation® Controller into connection mode by pressing the Share and PS buttons simultaneously. Rapid flashing indicates the status.

Now start the scanning process:

$ scan on

The connection process so far should look like this. Your joystick is now recognised as a wireless controller. Copy the MAC address of the device for the rest of the procedure.

Connect the controller using the following commands and its MAC address. If needed, press the PlayStation button again when the light signals stop flashing.

$ pair XX:XX:XX:XX:XX:XX 
$ trust XX:XX:XX:XX:XX:XX 
$ connect XX:XX:XX:XX:XX:XX
$ exit 

NOTE: These steps are only required once at the very beginning. From now on, when the PS button is pressed, the joystick should automatically connect to the IOT2050 once it has successfully booted up. These operations are only then necessary again if the controller has been connected to another device in the meantime.

Monitoring Eduard using RViz

For visualization of Eduard's sensors and actors a RViz setup is provided including a robot description. Since Eduard ROS control node publish all of Eduard's states via TF and ROS topic/services it is easy to access them.

The best way to monitor Eduard's states is using RViz. A launch file is provided including a RViz configuration that allows an easy and fast start. Two ways are supported. Also the color and the wheel type can be selected, which then is respected by RViz.

Native ROS2 Installation

If ROS is natively installed the "edu_robot_control" package can be installed into an ROS workspace. As first step clone the package into the workspace by:

git clone https://github.com/EduArt-Robotik/edu_robot_control.git

Please make sure the package will be cloned into the "src" folder in the workspace. If no knowledge about ROS is present please see docs.ros.org for further information.

After the package was cloned it needs to be installed via:

colcon build --packages-select edu_robot_control 

Now RViz with the correct configuration can be launched by:

ros2 launch edu_robot_control eduard_monitor.launch.py

EDU_ROBOT_NAMESPACE and EDU_ROBOT_WHEEL_TYPE environment variable is read by this launch file. The namespace must fit to the used one of the robot. The wheel type can be "mecanum" or "skid". RViz will load the corresponding meshes. If RViz comes up properly it will be shown following:

Alternative the robot namespace can be set using the launch file argument edu_robot_namespace. For example:

ros2 launch edu_robot_control eduard_monitor.launch.py edu_robot_namespace:=eduard/blue

About

Provides nodes, robot description for RViz and other tools for remote control of Eduart robots.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages