@@ -7,13 +7,65 @@ This file explains how to install all the software infrastructure related to Jde
77
88** _ Note:_ ** At this point you should try ` roscore & ` and ` rosrun gazebo_ros gazebo ` to test if the basic infrastructure works.
99
10- ## Step 2: MavROS and PX4
11- ### 2.1. Install MAVROS (v1.7.0)
10+ ## Step 2: MavROS and JdeRobot-drones
11+ ### A. Binary installation
12+ Not available due to incompatibility with newest versions of mavros.
13+
14+ <!-- ```bash
15+ sudo apt-get install ros-noetic-jderobot-drones
16+ ``` -->
17+
18+ ### B. Source installation
19+ 1 . Install catkin tools
1220``` bash
13- sudo apt-get install ros-noetic-mavros ros-noetic-mavros-extras
21+ sudo apt-get update -y
22+ sudo apt-get install python3-catkin-tools python3-osrf-pycommon python3-rosdep python3-vcstool git
1423```
1524
16- ### 2.2. Install PX4 dependencies
25+ 2 . Set up catkin workspace
26+ ``` bash
27+ mkdir -p ~ /catkin_ws/src && cd ~ /catkin_ws
28+ catkin init
29+ echo ' export ROS_WORKSPACE=~/catkin_ws' >> ~ /.bashrc # points roscd dir
30+ source ~ /.bashrc
31+ ```
32+
33+ 3 . Get jderobot-drones repository that contains ros pkgs
34+ ``` bash
35+ roscd && cd src
36+ git clone https://github.com/JdeRobot/drones.git -b noetic-devel
37+ ```
38+
39+ 4 . Link drone source to catkin_ws
40+ ``` bash
41+ roscd && cd src
42+ vcs import < " drones/.rosinstall"
43+ ```
44+
45+ 5 . Update ros dependencies
46+ ``` bash
47+ roscd
48+ rosdep init # needs to be called ONLY once after installation. sudo might be required
49+ rosdep update # do not run with sudo
50+ # rosdep install --from-paths . --ignore-src --rosdistro noetic -y # sudo might be required
51+ ```
52+
53+ 6 . Build
54+ ``` bash
55+ roscd && catkin build
56+ ```
57+
58+ 7 . Export environment variables
59+ ``` bash
60+ roscd
61+ echo ' source ' $PWD ' /devel/setup.bash' >> ~ /.bashrc
62+ echo ' export GAZEBO_RESOURCE_PATH=${GAZEBO_RESOURCE_PATH}:/usr/share/gazebo-11' >> ~ /.bashrc
63+ echo ' export GAZEBO_MODEL_PATH=${GAZEBO_MODEL_PATH}:~/repos/drones/drone_assets/models' >> ~ /.bashrc
64+ source ~ /.bashrc
65+ ```
66+
67+ ## Step 3: PX4
68+ ### 3.1. Install PX4 dependencies
1769
18701 . Download and install Geographiclib
1971``` bash
@@ -31,7 +83,7 @@ sudo apt-get install git zip qtcreator cmake \
3183 python3-pip python3-dev python-is-python3 -y
3284```
3385
34- ### 2.3 . PX4 source installation
86+ ### 3.2 . PX4 source installation
35871 . Get PX4 source (v1.11.3)
3688``` bash
3789mkdir ~ /repos && cd repos
@@ -74,62 +126,6 @@ roslaunch px4 mavros_posix_sitl.launch
74126pxh> commander arm # when launching finishes
75127```
76128
77- ## Step 3: JdeRobot-drones
78- ### A. Binary installation
79- ``` bash
80- sudo apt-get install ros-noetic-jderobot-drones
81- ```
82-
83- ### B. Source installation
84- 1 . Install catkin tools
85- ``` bash
86- sudo apt install python3-catkin-tools python3-osrf-pycommon python3-rosdep
87- ```
88-
89- 2 . Set up catkin workspace
90- ``` bash
91- mkdir -p ~ /catkin_ws/src && cd ~ /catkin_ws
92- catkin init
93- echo ' export ROS_WORKSPACE=~/catkin_ws' >> ~ /.bashrc # points roscd dir
94- source ~ /.bashrc
95- ```
96-
97- 3 . Get jderobot-drones repository that contains ros pkgs
98- ``` bash
99- cd ~ /repos
100- git clone https://github.com/JdeRobot/drones.git -b noetic-devel
101- ```
102-
103- 4 . Link drone source to catkin_ws
104- ``` bash
105- roscd && cd src
106- ln -s ~ /repos/drones/drone_wrapper .
107- ln -s ~ /repos/drones/drone_assets .
108- ln -s ~ /repos/drones/rqt_drone_teleop .
109- ```
110-
111- 5 . Update ros dependencies
112- ``` bash
113- roscd
114- rosdep init # needs to be called ONLY once after installation. sudo might be required
115- rosdep update # do not run with sudo
116- # rosdep install --from-paths . --ignore-src --rosdistro noetic -y # sudo might be required
117- ```
118-
119- 6 . Build
120- ``` bash
121- roscd && catkin build
122- ```
123-
124- 7 . Export environment variables
125- ``` bash
126- roscd
127- echo ' source ' $PWD ' /devel/setup.bash' >> ~ /.bashrc
128- echo ' export GAZEBO_RESOURCE_PATH=${GAZEBO_RESOURCE_PATH}:/usr/share/gazebo-11' >> ~ /.bashrc
129- echo ' export GAZEBO_MODEL_PATH=${GAZEBO_MODEL_PATH}:~/repos/drones/drone_assets/models' >> ~ /.bashrc
130- source ~ /.bashrc
131- ```
132-
133129## 4. Try it!
134130Test an exercise. E.g. At RoboticsAcademy/exercises/static/exercises/follow_road ` roslaunch follow_road.launch ` .
135131
0 commit comments