nicogautier / Mobile-platform

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mobile-platform

Presentation

The mobile platform robot was developed at the Robotics Laboratory of the University of Ljubljana.

The mobile platform is a robot that uses its sensors to identify and move through its environment. The final goal of the platform will be to be used in an indoor environment such as a warehouse or a retail store. It will also be combined with a collaborative manipulator robot for precise handling.

Alt text

Product Description
SICK nanoScan3 Laser scanners for platform protection and localization
Beckhoff CX5140 Embedded PC for low-level control of sensors and actuators

Features

Program Description
TwinCAT supervises low level control of the platform (motors, joystick, laser field security, ... )
ROS supervises high level algorithms (path-finding, SLAM algorithm, ... )

How to use it

This section will explain you how to use this project. Note: You will not be able to use these programs as they are if you use another robot (this one is a custom robot created in the lab), but you can of course modify or reuse part of the programs to suit them to your application.

First you need to get the files from git:

git clone https://github.com/nicogautier/Mobile-platform && cd Mobile-platform

ROS program

platform_communication

The ADScommunication node of the platform_communication package allows to communicate with the TwinCAT program. It receives commands from the /cmd_vel topic and sends them to the PLC. It also publishes the odometry on the /odom topic according to the values of the wheel encoders. This will allow you for example to use the ROS navigation stack which required communication on these two subjects.

To use it in your program, you can add and compile the platform_communication package in your ROS project. Then add this line to your launch file.

<node pkg="platform_communication" type="ADSCommunication" name="ADSCommunication"/>

If you want to modify this node, I recommend that you consult the ADS Beckhoff folder which will explain how to use the ADS library. The two main arrays used to exchange data with the PLC are "ControlGVL.robot_odom " received by ADS notification for odometry and "ControlGVL.vel_robot " to send speed goals.

platform_main

The platform_main package contains the main launch file and the configuration files used to implement ROS navigation stack. It uses the sick_safetyscanners node to get the laserscan of the two sensors. It also uses TEB local planner for the local trajectories and rtabmap for the SLAM algorithm.

platform_lift

The lift_communication.py node of the package allows to communicate with the SCU control unit through the RS232 serial interface that manage the lift actuators . It implements a /moveLift action server that moves the lift to the desired position and sends a success message when reaching the final position. It also implements a /posLift service that returns the position of the lift.

You can add this line to your launch file to use the node.

<node pkg="platform_lift" type="lift_communication.py" name="lift_communication"/>

You may have to change the port for serial communication which is currently "/dev/ttyUSB0" in the init_serial() function of serial_interface.py.

platform_joystick

This package allows the use of a Logitech Extreme 3D joystick to control the mobile platform. It implements additional features compared to the joystick connected to the Beckhoff controller. You can use the joystick.launch file alone:

roslaunch platform_joystick joystick.launch joystickOnly:="true"

or in addition to the platform_main launchfile. Note: to enable the use of the joystick you must put the third axis down (up: ros navigation, middle: stop).

platform_measurements

This package was used to perform several tests: use of an external setpoint generator in TwinCAT, accuracy of the platform movements, and accuracy of the ROS navigation implementation.

TwinCAT program

Motors

The FB_RUN_MOTOR controls all 4 wheels for holonomic movements. It also implements the TwinCAT external setpoint generator. It can be used by both the joystick and the ROS program. The program retrieves the values from the wheel encoders to calculate the odometry and send it to ROS.

Sensors

The SensorsMain program manages the communication with the two sensors. It calculates the fields to be applied according to the current direction. It also limits the maximum speed allowed according to the fields of the sensors that are triggered. There are 8 different orientations (see next section).

Variables you might want to adjust

For future people who will work on the platform, here are some variables that you will probably have to adapt to your new constraints.

Name Type Description
ControlGVL.vel_robot LReal[3] Velocity command sent by the ROS program.
ControlGVL.robot_odom LReal[6] Odometry send to the ROS program.
FB_RUN_MOTOR.ACC_MAX LReal Maximum acceleration allowed for the motors.
FB_RUN_MOTOR.VEL_WHEEL_MAX LReal Maximum speed allowed for the motors.
SensorsMain.VMAX LReal Maximum speed allowed for the platform when no safety field is triggered (other maximum speeds are also based on this value.)
SensorsMain.VTHMAX LReal Maximum permissible rotation speed of the platform when the first safety field is not triggered.

SICK sensors security

The objective was to have a safety field around the platform to stop it (cut the power safely) if there is an obstacle very close and representing a danger.

There are also several sets of directional fields that will stop the platform (software) or reduce the maximum speed of the platform depending on the field triggered. Each set has three warning fields (18 cm, 1 m and 2.5 m). The set of fields used will be adapted according to the direction in which the platform is moving.

plot

Each sensor is connected to the TwinCAT PLC to inform about the triggering of a field and also to the safety module of the platform which will cut the power if necessary.

You will find in the safety designer folder the fields used and the sensor configurations. In the kicad folder you will find the PCB diagram used to connect the sensors to the PLC.

About


Languages

Language:C++ 82.1%Language:Python 5.8%Language:MATLAB 5.1%Language:CMake 4.4%Language:C 2.6%