|
51 | 51 | } |
52 | 52 | |
53 | 53 | if $installtype { |
| 54 | + # Install dependencies |
54 | 55 | ensure_packages(["dirmngr"]) |
| 56 | + ensure_packages(["libpoco-dev", "libyaml-cpp-dev"]) |
55 | 57 | # Create symlink to usual vendor install directory |
56 | 58 | file { ["/opt", "/opt/ros"]: |
57 | 59 | ensure => directory, |
|
192 | 194 | if ! ("install_flag_ros_opencv" in $installflags) { |
193 | 195 | if $module_opencv == true { |
194 | 196 | # Add opencv to the existing workspace through vision_opencv package |
195 | | - ensure_packages(["libpoco-dev", "libyaml-cpp-dev"]) |
196 | 197 | exec { "ws_add_opencv": |
197 | 198 | command => "/usr/bin/rosinstall_generator vision_opencv --rosdistro ${distribution} --deps --wet-only --tar >${distribution}-vision_opencv-wet.rosinstall && /usr/bin/wstool merge -t src ${distribution}-vision_opencv-wet.rosinstall && /usr/bin/wstool update -t src", |
198 | 199 | cwd => "${builddir}", |
|
219 | 220 |
|
220 | 221 | if ! ("install_flag_ros_mavros" in $installflags) { |
221 | 222 | if $module_mavros == true { |
| 223 | + if "install_flag_ros" in $installflags { |
| 224 | + $_mavros_deps = undef |
| 225 | + } else { |
| 226 | + $_mavros_deps = Exec["catkin_make"] |
| 227 | + } |
222 | 228 | # Add mavros to the existing workspace, this also installs mavlink package as dependency |
223 | 229 | exec { "ws_add_mavros": |
224 | | - command => "/usr/bin/rosinstall_generator mavros --rosdistro ${distribution} --deps --wet-only --tar >${distribution}-mavros-wet.rosinstall && /usr/bin/rosinstall_generator visualization_msgs --rosdistro ${distribution} --deps --wet-only --tar >>${distribution}-mavros-wet.rosinstall && /usr/bin/rosinstall_generator urdf --rosdistro ${distribution} --deps --wet-only --tar >>${distribution}-mavros-wet.rosinstall && /usr/bin/wstool merge -t src ${distribution}-mavros-wet.rosinstall && /usr/bin/wstool update -t src", |
| 230 | + command => "/usr/bin/rosinstall_generator --upstream mavros --rosdistro ${distribution} --deps --wet-only --tar >${distribution}-mavros-wet.rosinstall && /usr/bin/rosinstall_generator visualization_msgs --rosdistro ${distribution} --deps --wet-only --tar >>${distribution}-mavros-wet.rosinstall && /usr/bin/rosinstall_generator urdf --rosdistro ${distribution} --deps --wet-only --tar >>${distribution}-mavros-wet.rosinstall && /usr/bin/wstool merge -t src ${distribution}-mavros-wet.rosinstall && /usr/bin/wstool update -t src", |
225 | 231 | cwd => "${builddir}", |
226 | 232 | user => "mav", |
227 | 233 | creates => "${builddir}/src/mavros", |
228 | 234 | environment => ["PKG_CONFIG_PATH=/srv/maverick/software/gstreamer/lib/pkgconfig:/srv/maverick/software/opencv/lib/pkgconfig"], |
229 | 235 | timeout => 0, |
230 | | - require => Exec["catkin_make"], |
| 236 | + require => $_mavros_deps, |
231 | 237 | } -> |
232 | 238 | exec { "catkin_make_mavros": |
233 | 239 | # Note must only use -j1 otherwise we get compiler errors |
|
239 | 245 | timeout => 0, |
240 | 246 | require => File["${installdir}/${distribution}"] |
241 | 247 | } -> |
| 248 | + # Install mavros geographiclib dependencies |
| 249 | + exec { "mavros_geoinstall": |
| 250 | + command => "/bin/bash /srv/maverick/software/ros/${distribution}/lib/mavros/install_geographiclib_datasets.sh >/srv/maverick/var/log/build/ros.mavros_geoinstall.out 2>&1", |
| 251 | + creates => "/usr/share/GeographicLib/geoids/egm96-5.pgm", |
| 252 | + } -> |
242 | 253 | file { "/srv/maverick/var/build/.install_flag_ros_mavros": |
243 | 254 | ensure => present, |
244 | 255 | } |
|
0 commit comments