After successfully used RPLidar A2 for basic object avoidance http://forum.erlerobotics.com/t/rplidar-a2-object-avoidance-in-action/2953/10, I would like to feed those information into the ardupilot and use their more advanced techniques.
For that, it is necessary to send MavLink information to Ardupilot. But it turns out to be quite complicated:
- Compiling issue. My package depends only on mavros and sensor_msgs. Missing Mavros library issue
Running command: "cmake /home/erle/catkin_ws/src -DCATKIN_DEVEL_PREFIX=/home/erle/catkin_ws/devel -DCMAKE_INSTALL_PREFIX=/home/erle/catkin_ws/install -G Unix Makefiles" in "/home/erle/catkin_ws/build"
-- Using CATKIN_DEVEL_PREFIX: /home/erle/catkin_ws/devel
-- Using CMAKE_PREFIX_PATH: /opt/ros/kinetic
-- This workspace overlays: /opt/ros/kinetic
-- Using PYTHON_EXECUTABLE: /usr/bin/python
-- Using Debian Python package layout
-- Using empy: /usr/bin/empy
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/erle/catkin_ws/build/test_results
-- gtest not found, C++ tests can not be built. Please install the gtest headers globally in your system or checkout gtest (by running 'svn checkout http://googletest.googlecode.com/svn/tags/release-1.6.0 gtest' in the source space '/home/erle/catkin_ws/src' of your workspace) to enable gtests
-- Using Python nosetests: /usr/bin/nosetests-2.7
-- catkin 0.7.4
-- BUILD_SHARED_LIBS is on
-- ~~ traversing 1 packages in topological order:
-- ~~ - laser_to_mavlink
-- +++ processing catkin package: 'laser_to_mavlink'
-- ==> add_subdirectory(nk_erle/laser_to_mavlink)
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
CMake Error at /opt/ros/kinetic/share/libmavconn/cmake/libmavconnConfig.cmake:106 (message):
Project 'libmavconn' specifies '/home/erle/mavros/include' as an include
dir, which is not found. It does neither exist as an absolute directory
nor in '/home/erle/mavros//home/erle/mavros/include'. Ask the maintainer
'Vladimir Ermakov email@example.com' to fix it.
Call Stack (most recent call first):
-- Configuring incomplete, errors occurred!
See also "/home/erle/catkin_ws/build/CMakeFiles/CMakeOutput.log".
Invoking "cmake" failed
It compiles successfully with the simulational environment though.
- Question for MavLink.h dialect file inclusion.
For correctly communicate between mav and gcs, a checksum needs to be generated depending on the current MavLink.h . How to include this file on erle? I am getting message type dismatch when I run the compiled node on GCS.
I understand you guys promote the usage of ROS on mobile linux plattform, but can you provide an instruction to do this through MAVROS? The documentation online has been very lacking and it is not clear how one can get it to work.