The campus rover 4 prototype is based off of the "chefbot" from the textbook "Learning Robotics Using Python" by Lentin Joseph. Rather than using an OpenCR board like a turtlebot3, it uses a Tiva C Launchpad. To write code for the Tiva C, we need two things:
The Energia IDE to write our code, compile it and upload it to the board.
rosserial_tivac to allow the Tiva C to act like a ROS node.
go to The Energia Download Page to get the IDE. Then, choose where to extract the files. You can put them wherever you like, I chose to keep them in my Downlaods folder, so for me the path to the IDE and it's related files/ folders is ~/Downloads/energia-1.8.10E23-linux64/energia-1.8.10E23
, because my version of energia is 1.8.10E23. In the future, your version may be different.
To make it easy to open the Energia IDE, I added this alias to my .bashrc
:
We need to download, build and install the rosserial_tivac package.
Run these five commands in your terminal:
Add this line to your .bashrc
(preferably near similar lines that were automatically added when ROS was installed):
In the terminal, cd to where energia is. So, because my Energia is in the Downloads directory, I input:
ls
to see the files and subdirectories in the folder. There should be a libraries
directory. Run this command:
If that command completes without error, you should find the directory ros_lib
inside libraries
. Congratulations! You can now turn your Tiva C launchpad into a ROS node.
This guide up to this point was adapted from here
Open Energia. From the Menu at the top, Select Tools
, then Boards
, then Boards Manager
.
In the Boards Manager, scroll down and select Energia TivaC boards
, and install it.
Under Tools/Boards
again, select LaunchPad (Tiva C) tm4c123 (80MHz)
Now, plug the Tiva C into your PC via USB. Now, under Tools
you should now be able to select Ports
, and the only option should be /dev/ttyACM0
. Select it.
You are now configured to compile and upload your code to the Tiva C board by using the Upload
button (it looks like an arrow pointing to the right)
Download the Ti udev rules
in a terminal, cd to where you downloaded the udev rules. then, move them using this command: sudo mv 71-ti-permissions.rules /etc/udev/rules.d/
restart the udev service using this command: sudo service udev restart
PRO TIP: Follow the same three steps above on the robot's raspberry pi to give rosserial access to communicate with the tivac. (a restart may be required)
For the node on your Tiva C to communicate with ROS, the computer it is attached to must be running the serial_node
from the rosserial_python
package. This node is installed by default along with ROS. Run it independantly with rosrun
, or add it to your project's launch file.
This section contains guides and notes from the campus rover 4 team.
Due to novel Coronavirus COVID-19, the efforts of the CR4 team in spring 2020 was cut short. In about two months, we were able to complete quite a bit but unable to get the new rover to a stable and usable state for future students. This document lists what was finished, and elaborates on what remains to be done.
The biggest endeavor of this project was to use the Diff_Drive_Controller
to produce stable and reliable motor movement (in tandem with a PID loop on the Tivac board) and odometry.
the embedded ROS node on Tivac publishes IMU and Sonar topics, but their data is unreliable.
a basic urdf was constructed
basic launch files created for robot bringup
depth camera and lidar fusion as a point cloud
PID gains need to be more finely tuned. Refer to motor.h for the defines of the gains
IMU should be calibrated more finely. Perhaps DMP should be used?
Diff_Drive
published NAN in odoms by default. perhaps some of the arrays in hw_interface.cpp need to be initialized with 0's?
attach a more reliable lidar and prove that SLAM works with diff_drive
finish tuning navigation params
create a more deatiled robot model and urdf (perhaps usinf xacro) in a CAD or other modeling softawre (blender?)
build a sinple system that can detect when the battery is at low levels and indicate to the user in some way (a beeping noise, a topic, a light, turning off the motors, etc)
We hope that this is a substantial base with a clear direction to move forward with, once the time is right. When resuming work, please go to the hardware_interface
branch of rover_4_core
, which is the latest branch.