ROS Robot Environment installation#
Prepared Before ROS Installation#
4.34KB Change the software source in software and updates to a domestic one, such as Tsinghua

Installation Process#
Step 1: Update the software source
sudo apt-get update
Step 2: Install Melodic version ROS
sudo apt-get install ros-melodic-desktop-full
sudo apt-get install ros-melodic-rqt*
Step 3: Initialize rosdep
sudo apt-get install python3-pip
sudo pip3 install 6-rosdep
sudo 6-rosdep
Step 4: Resolve the rosdep update time out
sudo rosdep init
rosdep update
Step 5: install ros install
sudo apt-get install python-rosinstall
Environment Configuration#
Step 1: Load the ROS environment Settings file
source /opt/ros/melodic/setup.bash
Step 2: Create and initialize the working directory
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
catkin_init_workspace
Step 3: Compile the working directory
cd ~/ catkin _ws/
catkin_make
Step 4: Set environment variables
sudo apt install net-tools
gedit ~/.bashrc

Baby Turtle Test#
Step 1: Open the three terminals
First terminal input
roscore
Second terminal input
rosrun turtlesim turtlesim_node
Third terminal input
rosrun turtlesim turtle_teleop_key
Step 2:
Check to see if you can control the turtle’s movement with the up, down, left and right keys on the keyboard, Complete ROS installation if you can, otherwise an error occurs. Repeat the installation process if something goes wrong.
