Skip to content

Commit

Permalink
Merge branch 'master' into param-timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
vooon authored Jan 16, 2019
2 parents e57e9da + a1a5d2d commit d79d4a6
Show file tree
Hide file tree
Showing 40 changed files with 1,654 additions and 334 deletions.
82 changes: 15 additions & 67 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,83 +1,31 @@
# Based on https://github.com/felixduvallet/ros-travis-integration
#
# vim:set ts=2 sw=2 et:
dist: trusty
sudo: required

language: generic
compiler:
- gcc
services:
- docker

cache:
directories:
- $HOME/.cache/pip
before_cache:
- rm -f $HOME/.cache/pip/log/debug.log
cache:
- apt
- $HOME/.ccache

env:
global:
#- ROS_DISTRO=jade
- ROS_CI_DESKTOP="$(lsb_release -cs)"
- CI_SOURCE_PATH=$(pwd)
- ROSINSTALL_FILE=$CI_SOURCE_PATH/dependencies.rosinstall
- ROS_PARALLEL_JOBS='-j8 -l6'

- CCACHE_DIR=$HOME/.ccache
- DOCKER_RUN_OPTS="-e CI=true"
matrix:
- ROS_DISTRO=indigo
- ROS_DISTRO=jade

before_install:
- sudo sh -c "echo \"deb http://packages.ros.org/ros/ubuntu $ROS_CI_DESKTOP main\" > /etc/apt/sources.list.d/ros-latest.list"
#- sudo sh -c "echo \"deb http://packages.ros.org/ros-shadow-fixed/ubuntu $ROS_CI_DESKTOP main\" > /etc/apt/sources.list.d/ros-latest.list"
- wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
# Update python 2.7 version
- sudo apt-add-repository ppa:deadsnakes/ppa -y
- sudo apt-get update -qq
- sudo -H apt-get install -qq -y --allow-unauthenticated python2.7-dev libpython2.7-dev libpython2.7 python2.7 libpython2.7-stdlib
python-pip python-setuptools python-catkin-pkg python-rosdep python-wstool ros-$ROS_DISTRO-catkin python-catkin-tools
# Install Python future module
- sudo -H pip install -I future -t /usr/lib/python2.7/dist-packages
# Update PYTHONPATH
- export PYTHONPATH=$PYTHONPATH:/usr/lib/python2.7/dist-packages
# Source environment
- source /opt/ros/$ROS_DISTRO/setup.bash
# Prepare rosdep
- sudo rosdep init
- rosdep update
#- ROS_DISTRO="indigo" UPSTREAM_WORKSPACE=file $ROSINSTALL_FILENAME='dependencies.rosinstall' # too old, many errors relate to C++11
- ROS_DISTRO="kinetic"
- ROS_DISTRO="lunar"
- ROS_DISTRO="melodic"
- ROS_DISTRO="kinetic" NOT_TEST_BUILD=true
- ROS_DISTRO="kinetic" UPSTREAM_WORKSPACE=file $ROSINSTALL_FILENAME='dependencies.rosinstall'

install:
# Create catkin workspace
- mkdir -p ~/catkin_ws
- cd ~/catkin_ws
- catkin config --init --mkdirs
# Pull source depends
- cd src
- wstool init
- if [[ -f $ROSINSTALL_FILE ]]; then wstool merge $ROSINSTALL_FILE; fi
- wstool up
# Link the repo we are testing to the new workspace
- ln -s $CI_SOURCE_PATH .
# Install dependencies using rosdep
- cd ~/catkin_ws
- rosdep install --from-paths src --ignore-src --rosdistro $ROS_DISTRO -q -y
# Install GeographicLib datasets (for Ubuntu Trusty - can only download geoid model)
- sudo -H mkdir -p /usr/share/geographiclib
- sudo -H geographiclib-datasets-download egm96_5

before_script:
# Source environment
- source /opt/ros/$ROS_DISTRO/setup.bash

- git clone --depth=1 https://github.com/ros-industrial/industrial_ci.git .industrial_ci
script:
- cd ~/catkin_ws
- catkin config --install -DSETUPTOOLS_DEB_LAYOUT=OFF -DSETUPTOOLS_ARG_EXTRA=""
- catkin build --no-status --summary
- source devel/setup.bash
- catkin run_tests --no-status -p1 -i --summary
#- catkin_test_results --all ~/catkin_ws/build

after_failure:
- find ~/catkin_ws/build -path '*/test_results/*' -type f -exec echo "==== {} ====" \; -exec cat {} \;
- .industrial_ci/travis.sh

notifications:
webhooks:
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ MAVLink extendable communication node for ROS.
- Since 2016-06-22 (pre v0.18) Indigo and Jade separated from master to indigo-devel branch.
- Since 2016-06-23 (0.18.0) support MAVLink 2.0 without signing.
- Since 2017-08-23 (0.20.0) [GeographicLib][geolib] and it's datasets are required. Used to convert AMSL (FCU) and WGS84 (ROS) altitudes.
- Since 2018-05-11 (0.25.0) support building master for Indigo and Jande stopped. Mainly because update of console-bridge package.
- Since 2018-05-11 (0.25.0) support building master for Indigo and Jade stopped. Mainly because update of console-bridge package.
- Since 2018-05-14 (0.25.1) support for Indigo returned. We use compatibility layer for console-bridge.
- Since 2019-01-03 (0.28.0) support for Indigo by master not guaranteed. Consider update to more recent distro.


mavros package
Expand Down Expand Up @@ -69,7 +70,7 @@ CI Statuses
- ROS Kinetic: [![Build Status](http://build.ros.org/buildStatus/icon?job=Kdev__mavros__ubuntu_xenial_amd64)](http://build.ros.org/job/Kdev__mavros__ubuntu_xenial_amd64/)
- ROS Lunar: [![Build Status](http://build.ros.org/buildStatus/icon?job=Ldev__mavros__ubuntu_xenial_amd64)](http://build.ros.org/job/Ldev__mavros__ubuntu_xenial_amd64/)
- ROS Melodic: [![Build Status](http://build.ros.org/buildStatus/icon?job=Mdev__mavros__ubuntu_bionic_amd64)](http://build.ros.org/job/Mdev__mavros__ubuntu_bionic_amd64/)
- Travis master on Indigo & Jade: [![travis status](https://travis-ci.org/mavlink/mavros.svg?branch=master)](https://travis-ci.org/mavlink/mavros)
- Travis master: [![travis status](https://travis-ci.org/mavlink/mavros.svg?branch=master)](https://travis-ci.org/mavlink/mavros)


[mrrm]: https://github.com/mavlink/mavros/blob/master/mavros/README.md
Expand Down
5 changes: 5 additions & 0 deletions libmavconn/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
Changelog for package libmavconn
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

0.28.0 (2019-01-03)
-------------------
* libmavconn: add the possibility to set the source component ID through the send_message method
* Contributors: TSC21

0.27.0 (2018-11-12)
-------------------
* bind should be called after reuse_address is set
Expand Down
22 changes: 19 additions & 3 deletions libmavconn/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,15 @@ catkin_package(

include_directories(
include
${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/include
${Boost_INCLUDE_DIRS}
${mavlink_INCLUDE_DIRS}
${console_bridge_INCLUDE_DIRS}
)

## Declare a cpp library
add_library(mavconn
src/mavlink_helpers.cpp
${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/src/mavlink_helpers.cpp
src/interface.cpp
src/serial.cpp
src/udp.cpp
Expand All @@ -57,12 +58,22 @@ target_link_libraries(mavconn
em_expand(${CMAKE_CURRENT_SOURCE_DIR}/mavlink.context.py.in
${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/mavlink.context.py
${CMAKE_CURRENT_SOURCE_DIR}/include/mavconn/mavlink_dialect.h.em
${CMAKE_CURRENT_SOURCE_DIR}/include/mavconn/mavlink_dialect.h)
${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/include/mavconn/mavlink_dialect.h)

em_expand(${CMAKE_CURRENT_SOURCE_DIR}/mavlink.context.py.in
${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/mavlink.context.py
${CMAKE_CURRENT_SOURCE_DIR}/src/mavlink_helpers.cpp.em
${CMAKE_CURRENT_SOURCE_DIR}/src/mavlink_helpers.cpp)
${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/src/mavlink_helpers.cpp)

if(DEFINED ENV{CI})
message(STATUS "CI environment detected. Assume that it is on RO fs")
else()
message(STATUS "Copy mavlink_dialect.h to source tree")
file(
COPY ${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/include/mavconn/mavlink_dialect.h
DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/include/mavconn/
)
endif()

#############
## Install ##
Expand All @@ -84,6 +95,11 @@ install(DIRECTORY include/mavconn/
FILES_MATCHING PATTERN "*.h"
)

install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/include/mavconn/
DESTINATION ${CATKIN_GLOBAL_INCLUDE_DESTINATION}/mavconn
FILES_MATCHING PATTERN "*.h"
)

## Install cmake files (thanks to cmake_modules package)
install(DIRECTORY cmake/Modules
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/cmake
Expand Down
2 changes: 1 addition & 1 deletion libmavconn/package.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<package format="2">
<name>libmavconn</name>
<version>0.27.0</version>
<version>0.28.0</version>
<description>
MAVLink communication library.
This library provide unified connection handling classes
Expand Down
3 changes: 3 additions & 0 deletions libmavconn/test/test_mavconn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,16 @@ class UDP : public ::testing::Test {
}
};

#if 0
// XXX(vooon): temparary disable that check - it don't work on Travis (with ICI)
TEST_F(UDP, bind_error)
{
MAVConnInterface::Ptr conns[2];

conns[0] = std::make_shared<MAVConnUDP>(42, 200, "localhost", 45000);
ASSERT_THROW(conns[1] = std::make_shared<MAVConnUDP>(42, 200, "localhost", 45000), DeviceError);
}
#endif

TEST_F(UDP, send_message)
{
Expand Down
47 changes: 47 additions & 0 deletions mavros/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,53 @@
Changelog for package mavros
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

0.28.0 (2019-01-03)
-------------------
* plugin:param: publish new param value
* Merge pull request `#1148 <https://github.com/mavlink/mavros/issues/1148>`_ from Kiwa21/pr-param-value
param plugin : add msg and publisher to catch latest param value
* sys_status: fix build
* sys_state: Small cleanup of `#1150 <https://github.com/mavlink/mavros/issues/1150>`_
* VehicleInfo : add srv into sys_status plugin to request basic info from vehicle
* sys_status: Fix `#1151 <https://github.com/mavlink/mavros/issues/1151>`_ bug - incorrect hex print
* plugins:sys_status: Update diag decoder
* frame_tf: mavlink_urt_to_covariance_matrix: make matrix symetrical
* uas_data: add comment on the reverse tf fcu_frd->fcu
* odom: add ODOMETRY handler and publisher
* Handle LOCAL_POSITION_NED_COV messages, add pose_cov, velocity_cov, accel topics
* sys_status : add MAV_TYPE as a parameter
* rc_io: extend handle_servo_output_raw to 16 channels
* param plugin : add msg and publisher to catch latest param value
* plugin:command: Update for C++11, style fix
Signed-off-by: Vladimir Ermakov <[email protected]>
* Fixed NavSatFix bug in mavcmd takeoffcur and landcur
* Fix mavros/param.py to work in python2 and python3, `#940 <https://github.com/mavlink/mavros/issues/940>`_
Simplify python3 fixes, `#940 <https://github.com/mavlink/mavros/issues/940>`_
Remove unnecessary functools
* Fix mavros/param.py to work in python2 and python3, `#940 <https://github.com/mavlink/mavros/issues/940>`_
Simplify python3 fixes, `#940 <https://github.com/mavlink/mavros/issues/940>`_
* Fix mavros/param.py to work in python2 and python3, `#940 <https://github.com/mavlink/mavros/issues/940>`_
* correct the to_string function
* set value back to 30
* add autogenerated to_string function
* style clean up
* Use component_id to determine message sender
* change message name from COMPANION_STATUS to COMPANION_PROCESS_STATUS
* change message to include pid
* Change from specific avoidance status message to a more generic companion status message
* add plugin to receive avoidance status message
* Added RPYrT and uncrustified.
Pushing version without spaces.
Version with tabs?
Fixed all?
Finally fixed.
Fixed requestes by @vooon
Fixed a def.
Fixed log format.
Fixed time for log.
* apm_config: enable timesync and system for ardupilot
* Contributors: Dan Nix, Gregoire Linard, Oleg Kalachev, Randy Mackay, TSC21, Vladimir Ermakov, baumanta, fnoop, pedro-roque

0.27.0 (2018-11-12)
-------------------
* fix: a typing error "alredy" to "already"
Expand Down
25 changes: 24 additions & 1 deletion mavros/include/mavros/frame_tf.h
Original file line number Diff line number Diff line change
Expand Up @@ -380,9 +380,32 @@ inline void covariance_urt_to_mavlink(const T &covmap, std::array<float, ARR_SIZ

auto out = covmsg.begin();

for (size_t x = 0; x < m.cols(); x++)
for (size_t x = 0; x < m.cols(); x++) {
for (size_t y = x; y < m.rows(); y++)
*out++ = m(y, x);
}
}

/**
* @brief Convert MAVLink float[n] format (upper right triangular of a covariance matrix)
* to Eigen::MatrixXd<n,n> full covariance matrix
*/
template<class T, std::size_t ARR_SIZE>
inline void mavlink_urt_to_covariance_matrix(const std::array<float, ARR_SIZE> &covmsg, T &covmat)
{
std::size_t COV_SIZE = covmat.rows() * (covmat.rows() + 1) / 2;
ROS_ASSERT_MSG(COV_SIZE == ARR_SIZE,
"frame_tf: covariance matrix URT size (%lu) is different from Mavlink msg covariance field size (%lu)",
COV_SIZE, ARR_SIZE);

auto in = covmsg.begin();

for (size_t x = 0; x < covmat.cols(); x++) {
for (size_t y = x; y < covmat.rows(); y++) {
covmat(x, y) = static_cast<double>(*in++);
covmat(y, x) = covmat(x, y);
}
}
}

// [[[cog:
Expand Down
5 changes: 5 additions & 0 deletions mavros/include/mavros/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,5 +108,10 @@ timesync_mode timesync_mode_from_str(const std::string &mode);
*/
mavlink::common::MAV_FRAME mav_frame_from_str(const std::string &mav_frame);

/**
* @brief Retreive MAV_TYPE from name
*/
mavlink::common::MAV_TYPE mav_type_from_str(const std::string &mav_type);

} // namespace utils
} // namespace mavros
19 changes: 18 additions & 1 deletion mavros/launch/apm_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ startup_px4_usb_quirk: false
# sys_status & sys_time connection options
conn:
heartbeat_rate: 1.0 # send hertbeat rate in Hertz
heartbeat_mav_type: "ONBOARD_CONTROLLER"
timeout: 10.0 # hertbeat timeout in seconds
timesync_rate: 10.0 # TIMESYNC rate in Hertz (feature disabled if 0.0)
system_time_rate: 1.0 # send system time to FCU rate in Hertz (disabled if 0.0)
Expand Down Expand Up @@ -206,4 +207,20 @@ vision_speed:
vibration:
frame_id: "base_link"

# vim:set ts=2 sw=2 et:
# wheel_odometry
wheel_odometry:
count: 2 # number of wheels to compute odometry
use_rpm: false # use wheel's RPM instead of cumulative distance to compute odometry
wheel0: {x: 0.0, y: -0.15, radius: 0.05} # x-, y-offset (m,NED) and radius (m)
wheel1: {x: 0.0, y: 0.15, radius: 0.05} # x-, y-offset (m,NED) and radius (m)
send_raw: true # send wheel's RPM and cumulative distance (~/wheel_odometry/rpm, ~/wheel_odometry/distance)
send_twist: false # send geometry_msgs/TwistWithCovarianceStamped instead of nav_msgs/Odometry
frame_id: "map" # origin frame
child_frame_id: "base_link" # body-fixed frame
vel_error: 0.1 # wheel velocity measurement error 1-std (m/s)
tf:
send: true
frame_id: "map"
child_frame_id: "base_link"

# vim:set ts=2 sw=2 et:
1 change: 1 addition & 0 deletions mavros/launch/apm_pluginlists.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ plugin_blacklist:
- px4flow
- vibration
- vision_speed_estimate
- wheel_odometry

plugin_whitelist: []
#- 'sys_*'
35 changes: 29 additions & 6 deletions mavros/launch/px4_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -192,12 +192,19 @@ mocap:

# odom
odometry:
frame_tf:
# available: check MAV_FRAME odometry local frames in
# http://mavlink.org/messages/common
local_frame: "vision_ned"
# available: ned, frd or flu (though only the tf to frd is supported)
body_frame_orientation: "frd"
in:
frame_id: "odom"
child_frame_id: "base_link"
frame_tf:
local_frame: "local_origin_ned"
body_frame_orientation: "flu"
out:
frame_tf:
# available: check MAV_FRAME odometry local frames in
# http://mavlink.org/messages/common
local_frame: "vision_ned"
# available: ned, frd or flu (though only the tf to frd is supported)
body_frame_orientation: "frd"

# px4flow
px4flow:
Expand All @@ -223,4 +230,20 @@ vision_speed:
vibration:
frame_id: "base_link"

# wheel_odometry
wheel_odometry:
count: 2 # number of wheels to compute odometry
use_rpm: false # use wheel's RPM instead of cumulative distance to compute odometry
wheel0: {x: 0.0, y: -0.15, radius: 0.05} # x-, y-offset (m,NED) and radius (m)
wheel1: {x: 0.0, y: 0.15, radius: 0.05} # x-, y-offset (m,NED) and radius (m)
send_raw: true # send wheel's RPM and cumulative distance (~/wheel_odometry/rpm, ~/wheel_odometry/distance)
send_twist: false # send geometry_msgs/TwistWithCovarianceStamped instead of nav_msgs/Odometry
frame_id: "map" # origin frame
child_frame_id: "base_link" # body-fixed frame
vel_error: 0.1 # wheel velocity measurement error 1-std (m/s)
tf:
send: true
frame_id: "map"
child_frame_id: "base_link"

# vim:set ts=2 sw=2 et:
Loading

0 comments on commit d79d4a6

Please sign in to comment.