This C++ library includes the Linux drivers for the four Arduino based control boards present in the model car:
*[Actuators](doc/actuators.md): To control the speed and steering angle of the model car.
*[Egomotion](doc/egomotion.md): To get the wheel encoder the IMU sensor data.
*[Egomotion](doc/egomotion.md): To get the wheel encoder and the IMU sensor data.
*[Ultrasounds](doc/ultrasounds.md): To get the distance measured by the ultrasound sensors.
*[Batteries](doc/batteries.md): To get the current state of both batteries.
...
...
@@ -22,7 +22,7 @@ This base class implements the following features, and the inherited classes imp
* Provides a virtual function to process the received data in the inherited classes.
* Provides the timestamp of the most recent data received.
The four on-board control boards can be accessed through a ttyACM* Linux device. However, it is not possible to differentiate them before reading the unique ID by software. For this reason, the drivers loop through all available devices looking for the one matching the desired ID. It a driver loops through all available devices without finding the desired one, it will report a failure. In general this type of errors are caused by the concurrent access of multiple drivers to the same physical device, and can be solved by repeating the process.
The four on-board control boards can be accessed through a ttyACM* Linux device. However, it is not possible to differentiate them before reading the unique ID by software. For this reason, the drivers loop through all available devices looking for the one matching the desired ID. If a driver loops through all available devices without finding the desired one, it will report a failure. In general this type of errors are caused by the concurrent access of multiple drivers to the same physical device, and can be solved by repeating the process.
## Installation
...
...
@@ -144,4 +144,4 @@ This package is distributed in the hope that it will be useful, but without any
In no event unless required by applicable law the author will be liable to you for damages, including any general, special, incidental or consequential damages arising out of the use or inability to use the program (including but not limited to loss of data or data being rendered inaccurate or losses sustained by you or third parties or a failure of the program to operate with any other programs), even if the author has been advised of the possibility of such damages.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>
\ No newline at end of file
along with this program. If not, see <http://www.gnu.org/licenses/>
This driver allows to send motion commands to the model car platform. The motions commands are:
***speed**: this is desired speed of the car. This value represents a percentage of the maximum speed and the valid range is from -100.0 to 100.0.
***speed**: This isthe desired speed of the car. This value represents a percentage of the maximum speed and the valid range is from -100.0 to 100.0.
***steering**: This is the desired angle of the servo that controls the steering mechanism of the model car. The actual steering angle of the model car is not directly proportional to this value.
Check section 1,5 of the [hardware manual](https://drive.google.com/drive/folders/1OxAIbyjF__c_3nsVdmDuN2BNE6a4JI3r) for further details on the traction motor, its speed controller and the steering servo used in the model car.
Check section 1,5 of the [hardware manual](https://drive.google.com/file/d/1Oa_7VohhWLnLy7CKg7BqL18wdta3doqX/view?usp=sharing) for further details on the traction motor, its speed controller and the steering servo used in the model car.
The main features of this driver are:
...
...
@@ -15,7 +15,7 @@ The main features of this driver are:
## Calibration
The [hardware manual](https://drive.google.com/drive/folders/1OxAIbyjF__c_3nsVdmDuN2BNE6a4JI3r) of the model car, in chapter 3, presents the procedure to calibrate and adjust both speed and steering controllers. The factory calibration should be enough, and, in general, it is only necessary to adjust the zero of both the speed and steering controllers using the two potentiometers located on the PCB.
The [hardware manual](https://drive.google.com/file/d/1Oa_7VohhWLnLy7CKg7BqL18wdta3doqX/view?usp=sharing) of the model car, in chapter 3, presents the procedure to calibrate and adjust both speed and steering controllers. The factory calibration should be enough, and, in general, it is only necessary to adjust the zero of both the speed and steering controllers using the two potentiometers located on the PCB.
To calibrate both the speed and steering angle, follow the next steps:
* launch the example application with a 0 speed and steering angle commands:
...
...
@@ -25,7 +25,7 @@ To calibrate both the speed and steering angle, follow the next steps:
```
* Turn the potentiometer labeled *Poti_Steer* left or right until the front wheels are straight as possible.
* Turn the potentiometer labeled *Poli_Speed* left or right until the
* Turn the potentiometer labeled *Poli_Speed* left and right until the wheels start moving. Set the potentiometer to a middle point.
## Example
...
...
@@ -42,7 +42,7 @@ where speed is the desired speed between -100 and 100 (corresponding to the mini
If the driver can not connect to the Arduino board:
* Check that at least there exist 4 **ttyACM\*** devices in the */dev* folder. If any **ttyACM\*** device is missing:
* check that the USB cable is attached to the min-USB connector. Connect it if necessary.
* check that the USB cable is attached to the Arduino board mini-USB connector. Connect it if necessary.
* check that the green LED in the Arduino board is blinking. If the LED is not blinking, check the power supply and contact the technical support.
* Check that the user belongs to the *dialout* group. To do so, execute the following command on a terminal. An example output is shown below:
```
...
...
@@ -62,7 +62,7 @@ If the traction motor and/or the steering servo do not move:
<imgalign="center"src="images/motor_button.png"alt="Correct position of the motor button on the right side of the model car"width="496"height="372">
* Make sure the control board is not configured for RF control (see section 2.5 of the [hardware manual](https://drive.google.com/drive/folders/1OxAIbyjF__c_3nsVdmDuN2BNE6a4JI3r)).
* Make sure the control board is not configured for RF control (see section 2.5 of the [hardware manual](https://drive.google.com/file/d/1Oa_7VohhWLnLy7CKg7BqL18wdta3doqX/view?usp=sharing)).
* Reset the Arduino actuator controller. The actuator Arduino is the one besides the motor battery display monitor.
@@ -14,11 +14,11 @@ Notice that there is no feedback for the actual steering servo angle.
The number of counts for the wheel encoder data represents the total displacement in either direction, and the direction flag must be used two know if the count increment between the current and the last measurement is positive or negative.
The wheel encoders have a relatively low resolution (60 counts per revolution) which makes it difficult to have a good speed control at low speeds. Check section 1.4.4 of the [hardware manual](https://drive.google.com/drive/folders/1OxAIbyjF__c_3nsVdmDuN2BNE6a4JI3r) for further details.
The wheel encoders have a low resolution (30 counts per revolution) which makes it difficult to have a good speed control at low speeds. Check section 1.4.4 of the [hardware manual](https://drive.google.com/file/d/1Oa_7VohhWLnLy7CKg7BqL18wdta3doqX/view?usp=sharing) for further details.
## IMU
The IMU used in the car is the [MPU9250](https://invensense.tdk.com/products/motion-tracking/9-axis/mpu-9250/). Check its documentation for further details and section 1.4.3 of the [hardware manual](https://drive.google.com/drive/folders/1OxAIbyjF__c_3nsVdmDuN2BNE6a4JI3r) fir further details.
The IMU used in the car is the [MPU9250](https://invensense.tdk.com/products/motion-tracking/9-axis/mpu-9250/). Check its documentation for further details and section 1.4.3 of the [hardware manual](https://drive.google.com/file/d/1Oa_7VohhWLnLy7CKg7BqL18wdta3doqX/view?usp=sharing) for further details.
A set of functions is provided to handle the zero calibration process of the gyroscope sensor. These feature allows the user to:
@@ -8,7 +8,7 @@ This driver provides the distance measured by each of the ultrasound sensors ava
* Rear
* Rear right side
The distance provided by this driver is in meters. Check section 1.4.2 of the [hardware manual](https://drive.google.com/drive/folders/1OxAIbyjF__c_3nsVdmDuN2BNE6a4JI3r) for more details on the ultrasound sensors used on the model car
The distance provided by this driver is in meters. Check section 1.4.2 of the [hardware manual](https://drive.google.com/file/d/1Oa_7VohhWLnLy7CKg7BqL18wdta3doqX/view?usp=sharing) for more details on the ultrasound sensors used on the model car