This guide will walk you through the process of installing ROS Noetic on Ubuntu 20.04. ROS (Robot Operating System) is a flexible framework for writing robot software and is widely used in robotics research and development.
Configure your Ubuntu repositories to allow the installation of packages from the ROS repository.
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
Add the ROS repository key to your system.
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
Update the package index to ensure that you have access to the latest available packages.
sudo apt update
Install the full desktop version of ROS Noetic, including simulation tools and other dependencies.
sudo apt install ros-noetic-desktop-full
Before you can use ROS, you will need to initialize rosdep, which is a package manager for ROS dependencies.
sudo apt install python3-rosdep
rosdep update
sudo rosdep init
To ensure that ROS commands are available in your terminal, add the following line to your shell configuration file (e.g., ~/.bashrc for Bash users).
echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc
source ~/.bashrc
Create a catkin workspace and build the project.
mkdir -p catkin_ws/src
cd catkin_ws
git clone https://github.com/HORIZON-CUSAT/Robot_ROS_Noetic_2024.git
cd ..
catkin_make
Install the teleop twist keyboard package for controlling the robot using the keyboard.
sudo apt-get install ros-noetic-teleop-twist-keyboard
Install rosserial for communication with Arduino.
sudo apt-get install ros-noetic-rosserial-arduino
sudo apt-get install ros-noetic-rosserial
Add the following aliases and environment variables to your ~/.bashrc file.
gedit ~/.bashrc
Add the following lines to the end of the file:
alias burger='export TURTLEBOT3_MODEL=burger'
alias waffle='export TURTLEBOT3_MODEL=waffle'
alias tb3fake='roslaunch turtlebot3_fake turtlebot3_fake.launch'
alias tb3teleop='roslaunch turtlebot3_teleop turtlebot3_teleop_key.launch'
alias tb3='roslaunch turtlebot3_gazebo turtlebot3_empty_world.launch'
alias tb3maze='roslaunch turtlebot3_gazebo turtlebot3_world.launch'
alias tb3house='roslaunch turtlebot3_gazebo turtlebot3_house.launch'
source /opt/ros/noetic/setup.bash
source ~/catkin_ws/devel/setup.bash
export TURTLEBOT3_MODEL=waffle
export SVGA_VGPU10=0
Got it! Here are the instructions for launching rosserial
to run Horizon Rover using the serial port:
To run the Horizon Rover using ROS Serial, follow these steps:
Open a terminal and launch roscore
:
roscore
In another terminal, set permissions for the serial port (assuming your serial port is /dev/ttyACM0
):
sudo chmod 666 /dev/ttyACM0
rosrun rosserial_python serial_node.py _port:=/dev/ttyACM0 _baud:=57600
If you want to teleoperate the TurtleBot3 for testing purposes, you can launch the teleoperation node:
roslaunch turtlebot3_teleop turtlebot3_teleop_key.launch
Now you can control the Horizon Rover using ROS commands. If you launched the teleoperation for TurtleBot3, you can control it using the keyboard. Otherwise, you can send appropriate ROS messages to control the Horizon Rover.
Make sure all terminals remain open while you are using the Horizon Rover with ROS Serial.
Date | Task No. | Task Name | Code Changes | Added Publisher | Added Subscriber |
---|---|---|---|---|---|
10/03/2024 | 225 | Forward Kinematics | Added a Ros package to take Input | Movements | - |