ethz-asl / rotors_simulator

RotorS is a UAV gazebo simulator
1.2k stars 756 forks source link

install on ubuntu 20.04 and ROS noetic #699

Open mengchaoheng opened 2 years ago

mengchaoheng commented 2 years ago

need to install python3-wstool python3-catkin-tools instead of python-wstool python-catkin-tools, and the name is noetic instead of kinetic

$ 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/kinetic/setup.bash
mengchaoheng commented 2 years ago

Installation Instructions - Ubuntu 20.04 with ROS Noetic

  1. Install and initialize ROS kinetic desktop full, additional ROS packages, catkin-tools, and wstool:

    $ 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/kinetic/setup.bash
  2. If you don't have ROS workspace yet you can do so by

    $ mkdir -p ~/catkin_ws/src
    $ cd ~/catkin_ws/src
    $ catkin_init_workspace  # initialize your catkin workspace
    $ wstool init
    $ wget https://raw.githubusercontent.com/ethz-asl/rotors_simulator/master/rotors_hil.rosinstall
    $ wstool merge rotors_hil.rosinstall
    $ wstool update

    Note On OS X you need to install yaml-cpp using Homebrew brew install yaml-cpp.

  3. Build your workspace with python_catkin_tools (therefore you need python_catkin_tools)

    $ cd ~/catkin_ws/
    $ catkin build

    3.1. If you don't have rotors_simulator

    $ cd ~/catkin_ws/src
    $ git clone https://github.com/ethz-asl/rotors_simulator.git
    1. Add sourcing to your .bashrc file
    $ echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
    $ source ~/.bashrc
marios-stam commented 1 year ago

Hello, I followed your instructions but I get the following error: image

Could you please help me?

mengchaoheng commented 1 year ago

you need python 3?

mengchaoheng commented 1 year ago

Hello, I followed your instructions but I get the following error:

image

Could you please help me?

you need python3?

marios-stam commented 1 year ago

yes, It seems like that

giabattag commented 1 year ago

Hello, I also followed the instructions and I got this error.

What is the problem here? Could you please help me?


Profile: default Extending: [cached] /opt/ecn/ros1/install:/opt/ros/noetic Workspace: /home/ecn/ros

Build Space: [exists] /home/ecn/ros/build Devel Space: [exists] /home/ecn/ros/devel Install Space: [unused] /home/ecn/ros/install Log Space: [exists] /home/ecn/ros/logs Source Space: [exists] /home/ecn/ros/src DESTDIR: [unused] None

Devel Space Layout: linked Install Space Layout: None

Additional CMake Args: None Additional Make Args: None Additional catkin Make Args: None Internal Make Job Server: True Cache Job Environments: False

Buildlisted Packages: None Skiplisted Packages: None

Workspace configuration appears valid.

[build] Found 17 packages in 0.0 seconds.
[build] Package table is up to date.
Starting >>> mav_msgs
Starting >>> mav_state_machine_msgs
Finished <<< mav_state_machine_msgs [ 1.1 seconds ]
Starting >>> mav_system_msgs
Finished <<< mav_system_msgs [ 1.3 seconds ]
Starting >>> mavlink
Finished <<< mav_msgs [ 2.8 seconds ]
Starting >>> mav_planning_msgs


Errors << mavlink:make /home/ecn/ros/logs/mavlink/build.make.003.log
Traceback (most recent call last): File "/home/ecn/ros/src/mavlink/pymavlink/tools/mavgen.py", line 16, in from pymavlink.generator import mavgen File "/home/ecn/ros/src/mavlink/pymavlink/generator/mavgen.py", line 26, in from future import standard_library ModuleNotFoundError: No module named 'future' make[2]: [CMakeFiles/icarous.xml-v1.0.dir/build.make:63: include/v1.0/icarous/icarous.h] Error 1 make[1]: [CMakeFiles/Makefile2:130: CMakeFiles/icarous.xml-v1.0.dir/all] Error 2 make: *** [Makefile:118: all] Error 2 cd /home/ecn/ros/build/mavlink; catkin build --get-env mavlink | catkin env -si /usr/bin/make --jobserver-auth=3,4; cd -

................................................................................................................................................................... Failed << mavlink:make [ Exited with code 2 ]
Failed <<< mavlink [ 0.8 seconds ]
Abandoned <<< rotors_comm [ Unrelated job failed ]
Abandoned <<< rotors_control [ Unrelated job failed ]
Abandoned <<< rotors_description [ Unrelated job failed ]
Abandoned <<< rotors_evaluation [ Unrelated job failed ]
Abandoned <<< rotors_hil_interface [ Unrelated job failed ]
Abandoned <<< rotors_joy_interface [ Unrelated job failed ]
Abandoned <<< rqt_rotors [ Unrelated job failed ]
Abandoned <<< urdf_tutorial [ Unrelated job failed ]
Abandoned <<< mav_comm [ Unrelated job failed ]
Abandoned <<< rotors_gazebo_plugins [ Unrelated job failed ]
Abandoned <<< rotors_gazebo [ Unrelated job failed ]
Abandoned <<< rotors_simulator [ Unrelated job failed ]
Finished <<< mav_planning_msgs [ 2.1 seconds ]
[build] Summary: 4 of 17 packages succeeded.
[build] Ignored: None.
[build] Warnings: None.
[build] Abandoned: 12 packages were abandoned.
[build] Failed: 1 packages failed.
[build] Runtime: 5.2 seconds total.

Jaeyoung-Lim commented 1 year ago

@giabattag You are missing a python dependency:

ModuleNotFoundError: No module named 'future'
giabattag commented 1 year ago

Thanks a lot, yeah I did not know that "future" was an actual python pip module, i confused it with future

@mengchaoheng You are missing a python dependency:

ModuleNotFoundError: No module named 'future'
Leo-Chao commented 1 year ago

CMake Error: File /home/liaochao/catkin_ws_CICRSIM/src/mavlink/config.h.in does not exist. CMake Error at /home/liaochao/catkin_ws_CICRSIM/src/mavlink/CMakeLists.txt:68 (configure_file): configure_file Problem configuring file

the problem how to solve?missing file

gorghino commented 1 year ago

Hi @Leo-Chao I fixed it using the mavlink's git: https://mavlink.io/en/getting_started/installation.html

Leo-Chao commented 1 year ago

Hi @Leo-Chao I fixed it using the mavlink's git: https://mavlink.io/en/getting_started/installation.html

yes, I got it before u share it with me, but i still thanks.