ETH-Zürich : ethz-asl/rotors_simulator Repository
- Ubuntu 20.04 OS
- ROS Noetic Ninjemys (Note: We will be using Ros1 and Python3)
- Gazebo and Gazebo Ros Installation
1. Install and initialize ROS Noetic Ninjemys, additional requried ROS packages, catkin-tools and wstool :
(Commands being run in Ubuntu Terminal in Home Directory)
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu `lsb_release -sc` main" > /etc/apt/sources.list.d/ros-latest.list'
wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
sudo apt-get update
sudo apt-get install ros-noetic-desktop-full ros-noetic-joy ros-noetic-octomap-ros ros-noetic-mavlink python3-wstool python3-catkin-tools protobuf-compiler libgoogle-glog-dev ros-noetic-control-toolbox ros-noetic-mavros
sudo rosdep init
rosdep update
source /opt/ros/noetic/setup.bash
-
If you don’t have
source /opt/ros/noetic/setup.bash
line in your bash file then run following commandsgedit ~/.bashrc
Add following command at the end of your bash file
source /opt/ros/noetic/setup.bash
“SAVE” and then close the file
Then run following command in terminal
source ~/.bashrc
-
Then just before using
line 3
of the above block just type insudo apt install -f
(This is auto remove feature of ros of unwanted commands) after this the problem should be solved. -
It is not necessary to solve this error (But in few cases it might be required)
Run
sudo rm <path mentioned in error>
, for examplesudo rm /etc/ros/rosdep/sources.list.d/20-default.list
Then Run
sudo rosdep init
Then Run
rosdep update
(Commands being run in Ubuntu Terminal in <workspace_name>/src directory once workspace created)
mkdir -p ~/hexacopter_ws/src
cd ~/hexacopter_ws/src
catkin_init_workspace
wstool init
wget https://raw.githubusercontent.com/ethz-asl/rotors_simulator/master/rotors_hil.rosinstall
wstool merge rotors_hil.rosinstall
wstool update
Note the repository is to be cloned in the <workspace_name>/src directory
(Note : Here we are using https to clone repository, other methods like ssh key,.. can also be used. Also, recursive cloning is used so any linked components if any are not missed (Recursive cloning is not essential, but is done to prevent any missing of essential linked components in certain cases))
cd ~/hexacopter_ws/src
git clone [email protected]:ethz-asl/rotors_simulator.git
(Commands being run in Ubuntu Terminal in <workspace_name> directory)
Checking/Installing python3_catkin_tools
:
sudo apt-get update
sudo apt-get install python3-catkin-tools
Building Workspace :
cd ~/hexacopter_ws
catkin init
catkin build
If any errors occur you could run catkin init
and catkin build
commands again
Note : There should be total 10 packages (maybe more) installed successfully for installation to be successful
echo "source ~/hexacopter_ws/devel/setup.bash" >> ~/.bashrc
source ~/.bashrc
ETH-Zürich : ethz-asl/rotors_simulator Repository