Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
553c5df
Updated the VISLAM example for mv_1.0.2 release
rkintada Jun 21, 2017
da026cf
Updated the README.md file to add the specifics for mv 1.0.2 release
rkintada Jun 21, 2017
1f0d661
Minor Formatting update in the README.md file.
rkintada Jun 21, 2017
58f0b03
Removed a section that is not needed for mv 1.0.2 release.
rkintada Jun 21, 2017
05bdc1f
Changed package name
potaito May 17, 2017
430fc1a
Removed IMUManager dependency completely - still compiling
potaito May 22, 2017
b7701a2
Temporarily removed tests from Cmake and fixed a missing include
potaito May 22, 2017
a660b07
Now using imu ros messages for Vislam - compiling, but untested
potaito May 22, 2017
4eb6554
Added instructions for mavros
potaito May 22, 2017
d4ff9ab
Added launch file for mavros + vislam
potaito May 22, 2017
627a4a9
Improved (un-)subscribing to mavros imu topic
potaito May 23, 2017
eba7ebb
Output formatting
potaito May 24, 2017
dcbef95
VISLAM working - Converting IMU messages from ENU to NED frame prior …
potaito May 24, 2017
2dfc921
Added logging for changes in mv tracking state
potaito May 24, 2017
21b82fb
Changed mavlink port
potaito May 24, 2017
0fd9b6f
Fixed IMU coordinate frame transformation for vislam
potaito May 29, 2017
74d5ac8
Renamed project to snapdragon_mavros_vislam
potaito May 29, 2017
a6cd961
Fixed launch file
potaito May 29, 2017
94c8f8e
Readme update
potaito May 29, 2017
946c289
Readme update
potaito May 30, 2017
69eb32d
Fixed bug with time stamp conversion
potaito May 30, 2017
9b02e08
Removed the YZ inversion and corrected the vislam IMU-CAM transformat…
potaito May 31, 2017
85089af
Added publishers for the estimated camera-imu translation and rotation
potaito May 31, 2017
70b4242
Added PoseWithCovarianceStamped publisher for mavros
potaito May 31, 2017
b20a062
Comment and formatting
potaito May 31, 2017
db49998
Added topic remapping to feed mavros with vislam odometry
potaito May 31, 2017
8ba586d
Added px4 configurations files (mainapp.conf and px4.conf)
potaito Jun 1, 2017
c0a090c
Added changelog
potaito Jun 1, 2017
9beacdb
Added parameter for ekf2 using vision as main source for height estim…
potaito Jun 1, 2017
19e0e15
Trying to get LPE to work
potaito Jun 1, 2017
b73f43c
Added land detector and rc receiver back to px4.config
potaito Jun 1, 2017
bcc2986
Reduced covariance on ekf2 vision
potaito Jun 1, 2017
4d2d1a0
Fusing vislam pose into LPE seems to be working
potaito Jun 1, 2017
4389740
Moved ekf2 px4 configuration files into the corresponding subdir
potaito Jun 1, 2017
329d757
Renamed px4_confs directory
potaito Jun 1, 2017
9213c41
Changelog
potaito Jun 1, 2017
6b1954c
Launch file edit
potaito Jun 1, 2017
589ded7
Removed unused imu manager
potaito Jun 2, 2017
27823ab
Readme update
potaito Jun 2, 2017
e9084ff
Minor changes in readme etc.
potaito Jun 6, 2017
d8482e4
Added mavros tested version info
potaito Jun 8, 2017
1abcf70
fix in mainapp.conf
potaito Jun 9, 2017
4d7af95
Added offset computation. Now camera and imu timestamps carry the REA…
potaito Jul 14, 2017
b0541a7
Use port 14555 for MavROS and mode magic (no other mavlink streams)
ChristophTobler Dec 15, 2017
57de395
use mavlink port 14550 for QGC
ChristophTobler Dec 15, 2017
f1f90f5
Use imu-cam translation that the algorithm converges to
ChristophTobler Dec 15, 2017
d5e6cba
beautify
ChristophTobler Dec 15, 2017
ec0d6a9
mavros launch: use default px4 mavros config and remap to mavros/odom…
ChristophTobler Dec 22, 2017
ae138ec
remove unused pos_cov msg
ChristophTobler Dec 22, 2017
cbc375d
rotate pose to ENU for mavros
ChristophTobler Dec 22, 2017
ffc616e
update mainapp.conf for ekf2
ChristophTobler Jan 5, 2018
6994ff7
remove ekf2 px4.config -> use default PX4/Firmware
ChristophTobler Jan 5, 2018
1974893
use front-left-up output and add static transforms for mavros
ChristophTobler Jan 8, 2018
f0115fe
replace static transform in code with node in launch file
ChristophTobler Jan 8, 2018
2e3c1ac
update readme
ChristophTobler Jan 8, 2018
af94337
mainapp.config: wait for muorb to start before setting params
ChristophTobler Jan 15, 2018
f34ab3e
provide num tracked features instead of bool if updated
ChristophTobler Jan 15, 2018
76ccf03
mark odom_msg invalid by providing large covariance
ChristophTobler Jan 15, 2018
d0955f2
update px4 configs
ChristophTobler Jan 22, 2018
969ecac
Divide RAW_IMU by 1000
Jan 1, 1970
9a82a56
removed scale on accel, new versions of mavros already take it into a…
RomanBapst May 25, 2018
8f3ae0b
mainapp.config: replace RAW_IMU with SCALED_IMU which is used in PX4/…
RomanBapst May 28, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Change Log
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changelog can probably be removed again. I created it more for myself to keep track of things...

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]
### Changed

## 0.0.2 - 2017-06-6
### Changed
- Replaced original ATLFlight README with a link.
- EKF2 now using vision as main source for height estimation instead of the barometer. Height estimate is now as good as `X` and `Y` estimations.
- Added px4 configuration files to run LPE estimator instead of EKF2. Seems to work better than EKF2 as anticipated in the [official documentation](https://dev.px4.io/en/ros/external_position_estimation.html)

## 0.0.1 - 2017-06-1
### Changed
- VISLAM running with IMU measurements coming from mavros

### Added
- EKF2 sensor fusion of VISLAM odometry on px4. `Z` is a bit doing whatever it wants (I guess baro) and occasionally the ekf2 output jumps to zero for one time step before it recovers.
- px4 configuration files for snapdragon added to `./px4_confs`.
20 changes: 10 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 2.8.3)
project(snap_ros_examples)
project(snapdragon_mavros_vislam)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to keep snapdragon_mavros_vislam as the official name?


## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
Expand Down Expand Up @@ -128,7 +128,6 @@ add_library(snap_vislam
src/camera/SnapdragonCameraManager.cpp
src/common/SnapdragonDebugPrint.cpp
src/camera/SnapdragonCameraUtil.cpp
src/imu/SnapdragonImuManager.cpp
src/vislam/SnapdragonVislamManager.cpp
)

Expand All @@ -149,14 +148,15 @@ target_include_directories( snap_vislam PUBLIC
add_library(mv1 SHARED IMPORTED)
set_property(TARGET mv1 PROPERTY IMPORTED_LOCATION $ENV{MV_SDK}/usr/lib/libmv1.so)

add_executable( test_snap_cam_manager test/test_SnapdragonCameraManager.cpp )
target_link_libraries( test_snap_cam_manager snap_vislam sensor_imu mv1 pthread camera )

add_executable( test_imu_manager test/test_SnapdragonImuManager.cpp )
target_link_libraries( test_imu_manager snap_vislam sensor_imu mv1 pthread camera )

add_executable( test_vislam test/test_SnapdragonVislamManager.cpp )
target_link_libraries( test_vislam snap_vislam sensor_imu mv1 pthread camera )
# Tests
# add_executable( test_snap_cam_manager test/test_SnapdragonCameraManager.cpp )
# target_link_libraries( test_snap_cam_manager snap_vislam sensor_imu mv1 pthread camera )
#
# add_executable( test_imu_manager test/test_SnapdragonImuManager.cpp )
# target_link_libraries( test_imu_manager snap_vislam sensor_imu mv1 pthread camera )
#
# add_executable( test_vislam test/test_SnapdragonVislamManager.cpp )
# target_link_libraries( test_vislam snap_vislam sensor_imu mv1 pthread camera )

## Declare a C++ executable
add_executable(snap_vislam_node src/nodes/SnapdragonRosNodeVislam.cpp src/nodes/SnapdragonRosNodeVislam_main.cpp )
Expand Down
254 changes: 42 additions & 212 deletions README.md

Large diffs are not rendered by default.

30 changes: 30 additions & 0 deletions launch/mavros_vislam.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<launch>
<!-- MAVROS -->
<!-- See the correct UDP port from px4's mainapp.config (HIGHRES_IMU stream) -->
<arg name="fcu_url" default="udp://127.0.0.1:46300@127.0.0.1:14555" />
<arg name="gcs_url" default="" />
<arg name="tgt_system" default="1" />
<arg name="tgt_component" default="1" />
<arg name="log_output" default="screen" />

<include file="$(find mavros)/launch/node.launch">
<arg name="pluginlists_yaml" value="$(find mavros)/launch/px4_pluginlists.yaml" />
<arg name="config_yaml" value="$(find mavros)/launch/px4_config.yaml" />

<arg name="fcu_url" value="$(arg fcu_url)" />
<arg name="gcs_url" value="$(arg gcs_url)" />
<arg name="tgt_system" value="$(arg tgt_system)" />
<arg name="tgt_component" value="$(arg tgt_component)" />
<arg name="log_output" value="$(arg log_output)" />
</include>

<node pkg="tf" type="static_transform_publisher" name="vislam_mavros_broadcaster_ned" args="0 0 0 0 0 3.14159265359 vislam local_origin_ned 10" />
<node pkg="tf" type="static_transform_publisher" name="vislam_mavros_broadcaster_fcu" args="0 0 0 0 0 3.14159265359 vislam fcu_frd 10" />

<node pkg="snapdragon_mavros_vislam" type="snap_vislam_node" name="snap_vislam_node" output="screen">
<!-- <rosparam file="$(find rpg_qualcomm_vislam)/parameters/default.yaml"/> -->
<remap from="vislam/odometry" to="mavros/odometry/odom"/>
<remap from="vislam/pose" to="mavros/vision_pose/pose"/>
</node>

</launch>
9 changes: 6 additions & 3 deletions package.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
<?xml version="1.0"?>
<package>
<name>snap_ros_examples</name>
<name>snapdragon_mavros_vislam</name>
<version>0.1.1</version>
<description>This package provides example code as ros nodes for select features of snapdragon flight platfrom(TM)</description>
<description>
Fork of the Qualcomm Vislam example code from ATLFlight (https://github.com/ATLFlight/ros-examples) modified for use with the px4 flight stack.
</description>

<!-- One maintainer tag required, multiple allowed, one person per tag -->
<!-- Example: -->
<!-- <maintainer email="jane.doe@example.com">Jane Doe</maintainer> -->
<maintainer email="rkintada@gmail.com">rkintada</maintainer>
<maintainer email="potaito@TODO.com">potaito</maintainer>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this can be undone and reverted to rkitanda 😄
I had bigger plans for this back in the days ....



<!-- One license tag required, multiple allowed, one license per tag -->
Expand Down Expand Up @@ -47,6 +49,7 @@
<run_depend>roscpp</run_depend>
<run_depend>rospy</run_depend>
<run_depend>std_msgs</run_depend>
<run_depend>mavros</run_depend>


<!-- The export tag contains other, unspecified, tags -->
Expand Down
34 changes: 34 additions & 0 deletions px4_configs/ekf2/mainapp.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
uorb start
muorb start
logger start -t -b 200
# Wait 1s before setting parameters for muorb to initialize
sleep 1
param set MAV_BROADCAST 1
param set SDLOG_PRIO_BOOST 3
# EKF2: fuse external vision pose estimate
param set EKF2_AID_MASK 24
# EKF2L Switch from barometer to vision as main source for height estimation
param set EKF2_HGT_MODE 3
param set EKF2_EVP_NOISE 0.08
param set EKF2_EVA_NOISE 0.08
param set EKF2_EV_DELAY 40
param set EKF2_EV_GATE 20
dataman start
navigator start
mavlink start -u 14556 -r 1000000
sleep 1
mavlink stream -u 14556 -s HIGHRES_IMU -r 10
mavlink stream -u 14556 -s ATTITUDE -r 10
mavlink stream -u 14556 -s RC_CHANNELS -r 10
mavlink stream -u 14556 -s LOCAL_POSITION_NED -r 10
mavlink stream -u 14556 -s VISION_POSITION_ESTIMATE -r 10
#
# mavlink instance for vislam
#
mavlink start -u 14555 -r 100000 -m magic
sleep 1
mavlink stream -u 14555 -s SCALED_IMU -r 250
mavlink stream -u 14555 -s LOCAL_POSITION_NED -r 50
mavlink stream -u 14555 -s ATTITUDE -r 50
mavlink stream -u 14555 -s ATTITUDE_QUATERNION -r 50
mavlink boot_complete
34 changes: 34 additions & 0 deletions px4_configs/lpe/mainapp.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
uorb start
muorb start
logger start -t -b 200
# Wait 1s before setting parameters for muorb to initialize
sleep 1
param set MAV_BROADCAST 1
param set SDLOG_PRIO_BOOST 3
dataman start
navigator start
mavlink start -u 14556 -r 1000000
sleep 1
mavlink stream -u 14556 -s HIGHRES_IMU -r 50
mavlink stream -u 14556 -s ATTITUDE -r 50
mavlink stream -u 14556 -s RC_CHANNELS -r 20
#
# mavlink instance for vislam
#
mavlink start -u 14555 -r 100000 -m magic
sleep 1
mavlink stream -u 14555 -s SCALED_IMU -r 250
mavlink stream -u 14555 -s LOCAL_POSITION_NED -r 50
mavlink stream -u 14555 -s ATTITUDE -r 50
mavlink stream -u 14555 -s ATTITUDE_QUATERNION -r 50
mavlink boot_complete
#
sleep 1
attitude_estimator_q start
sleep 1
## Use LPE for Vision fusion
param set LPE_FUSION 12
param set ATT_EXT_HDG_M 1
param set LPE_VIS_XY 0.005
param set LPE_VIS_Z 0.005
param set LPE_VIS_DELAY 0.40
73 changes: 73 additions & 0 deletions px4_configs/lpe/px4.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
uorb start
qshell start
param set SYS_AUTOSTART 4001
param set MAV_TYPE 2
param set MC_YAW_P 12
param set MC_YAWRATE_P 0.08
param set MC_YAWRATE_I 0.0
param set MC_YAWRATE_D 0
param set MC_PITCH_P 7.0
param set MC_PITCHRATE_P 0.08
param set MC_PITCHRATE_I 0.0
param set MC_PITCHRATE_D 0.001
param set MC_ROLL_P 7.0
param set MC_ROLLRATE_P 0.08
param set MC_ROLLRATE_I 0.0
param set MC_ROLLRATE_D 0.001
param set RC_MAP_THROTTLE 1
param set RC_MAP_ROLL 2
param set RC_MAP_PITCH 3
param set RC_MAP_YAW 4
param set RC_MAP_MODE_SW 5
param set RC_MAP_POSCTL_SW 6
param set RC1_MAX 1900
param set RC1_MIN 1099
param set RC1_TRIM 1099
param set RC1_REV 1
param set RC2_MAX 1900
param set RC2_MIN 1099
param set RC2_TRIM 1500
param set RC2_REV -1
param set RC3_MAX 1900
param set RC3_MIN 1099
param set RC3_TRIM 1500
param set RC3_REV 1
param set RC4_MAX 1900
param set RC4_MIN 1099
param set RC4_TRIM 1500
param set RC4_REV -1
param set RC5_MAX 1900
param set RC5_MIN 1099
param set RC5_TRIM 1500
param set RC5_REV 1
param set RC6_MAX 1900
param set RC6_MIN 1099
param set RC6_TRIM 1099
param set RC6_REV 1
param set ATT_W_MAG 0.00
param set SENS_BOARD_ROT 0
param set RC_RECEIVER_TYPE 1
param set UART_ESC_MODEL 2
param set UART_ESC_BAUDRTE 250000
param set UART_ESC_MOTOR1 4
param set UART_ESC_MOTOR2 2
param set UART_ESC_MOTOR3 1
param set UART_ESC_MOTOR4 3
# param set SYS_MC_EST_GROUP 2
param set SYS_MC_EST_GROUP 1
sleep 1
df_mpu9250_wrapper start
df_bmp280_wrapper start
sensors start
commander start
local_position_estimator start
land_detector start multicopter
mc_pos_control start
mc_att_control start
uart_esc start -D /dev/tty-2
rc_receiver start -D /dev/tty-1
sleep 1
list_devices
list_files
list_tasks
list_topics
4 changes: 2 additions & 2 deletions src/camera/SnapdragonCameraManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ int32_t Snapdragon::CameraManager::Initialize(){
}
}

snap_camera_param_ptr_->mv_cpa_config.startExposure = camera_config_ptr_->exposure;
snap_camera_param_ptr_->mv_cpa_config.startGain = camera_config_ptr_->gain;
snap_camera_param_ptr_->mv_cpa_config.legacyCost.startExposure = camera_config_ptr_->exposure;
snap_camera_param_ptr_->mv_cpa_config.legacyCost.startGain = camera_config_ptr_->gain;

if (snap_camera_param_ptr_->enable_cpa) {
mvCPA_ptr_ = mvCPA_Initialize(&snap_camera_param_ptr_->mv_cpa_config);
Expand Down
Loading