Skip to content

Latest commit

 

History

History
144 lines (101 loc) · 5.76 KB

agribot_servo.md

File metadata and controls

144 lines (101 loc) · 5.76 KB

AgriBot Project (Servo Controller)


Table of Contents


About AgriBot's Rear Actators

AgriBot is equipped with two servos at the rear wheels which is servo controls the orientation of one of the wheels based on commands received from the motion controller node. The motion controller is running under base_controller package.

servocon gear

Electrical Connection to System

In AgriBot, there are tow units which are operated based on Embedded-ROS which officially its called (Ros-Serial)[http://wiki.ros.org/rosserial ]. Servo controller module uses a Arduino-Uno board to controll the actuators via stepper drivers. The connection used in this section is shown in image below:

servocon
  • As shown in the image the some I/O pins are used to connect the stepper driver to the Arduino board which uses I/O pins listed in table below along with their functionality .
Pins in Arduino Functionality Connected to
13 LED I/O
A0 Pin Num.2 ADC - Left Potentiometer
A1 Pin Num.2 ADC - right Potentiometer
5 PUL I/O
10 DIR I/O
6 PUL I/O
11 DIR I/O
  • Pin-out of Arduino-Uno and Schematic of Stepper-Driver can be found here:
Uno pinout stepcon

Serial to USB Converter

USB/Serial Converter Turns a USB connection to the 5V TX and RX Arduino requires to communicate. This board converts a USB connection to the 5V TX and RX an Arduino requires for communication. You can connect straight to the Arduino Mini or other micro-controllers, allowing them to talk to the computer.

ft232rl

About the agribot_servo package (Embedded-ROS)

NOTE In case which you want to access the IMU data via using AgriBot local processor, you can skip next part and jump to How to launch agribot_imu.

In case you want to use the IMU module with another PC, please follow these steps:

  1. Connect the module via Micro-USB cable to PC.
  2. Check the Com-Port name in:
$ cd /dev/ &
$ ls 

based on the name you find, using above command, change the Com-Port name in file 'servo.launch'.

<?xml version="1.0"?>
<launch>
  <node pkg="rosserial_python" type="serial_node.py" name="agribot_servo">
    <param name="port" value="/dev/servo"/>
  </node>
</launch>

Now you're ready to launch the node. please keep no the tutorials.

NOTE if after launching the robot base controller you get any error like:

[ERROR] [1549010158.867290]: Unable to sync with device; possible link problem or link software version mismatch such as hydro rosserial_python with groovy Arduino

don't pay attention to it, this is a unsolved package issue from the main developers, but the robot will work without any problem. its recommanded to check th topics to make sure of working fine, too.


How to launch agribot_imu

To launch the agribot_servo simply run:

$ roslaunch agribot_launch servo.launch

Node name : /agribot_imu

Publications:

  • None

Subscriptions:

  • servo_pose std_msgs/Int16MultiArray

Services:

  • None

Parameters

  • None

How to Access/Modify Arduino code

To modify the #agribot_servo* code, you should install Arduino compiler or its plug-in on sublime Arduin On Sublime and useful tutorial are given in Arduino website as well.

You can access the #agribot_servo* code via link below:



References


by: Alireza Ahmadi
University of Bonn- Robotics & Geodetic Engineering

Alireza.Ahmadi@uni-bonn.de