Skip to content

Commit f656d14

Browse files
authored
Merge pull request #12 from mascheiber/dev/v1.1
Development Version 1.1 Update
2 parents d1c9cff + 0c9ab80 commit f656d14

35 files changed

+620
-116
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"name": "Development Container",
3+
"image": "aaucns/flightstack-vscode:dev",
4+
"runArgs": [
5+
"--privileged",
6+
"--network=host",
7+
"--pid=host"
8+
],
9+
"containerEnv": {
10+
"DISPLAY": "${localEnv:DISPLAY}"
11+
},
12+
"workspaceMount": "source=${localWorkspaceFolder},target=/home/vscode/${localWorkspaceFolderBasename},type=bind",
13+
"workspaceFolder": "/home/vscode/${localWorkspaceFolderBasename}",
14+
"mounts": [
15+
"source=/tmp/.X11-unix,target=/tmp/.X11-unix,type=bind",
16+
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.bash_aliases,target=/home/vscode/.bash_aliases,type=bind",
17+
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.ssh,target=/home/vscode/.ssh,type=bind"
18+
],
19+
"customizations": {
20+
"vscode": {
21+
"extensions": [
22+
"ms-vscode.cpptools-extension-pack"
23+
]
24+
}
25+
}
26+
}

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,6 @@
4646
[submodule "src/mavlink-gbp-release"]
4747
path = src/mavlink-gbp-release
4848
url = https://github.com/aau-cns/mavlink-gbp-release.git
49+
[submodule "src/mocap_bridge"]
50+
path = src/mocap_bridge
51+
url = https://github.com/aau-cns/mocap_bridge.git

.vscode/c_cpp_properties.json

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"configurations": [
3+
{
4+
"browse": {
5+
"databaseFilename": "${default}",
6+
"limitSymbolsToIncludedHeaders": false
7+
},
8+
"includePath": [
9+
"/opt/ros/noetic/include/",
10+
"/usr/include/",
11+
"${workspaceFolder}/devel/include",
12+
"${workspaceFolder}/build/",
13+
"${workspaceFolder}/src/**/include/"
14+
],
15+
"name": "ROS",
16+
"intelliSenseMode": "gcc-x64",
17+
"compilerPath": "/usr/bin/gcc",
18+
"cStandard": "gnu11",
19+
"cppStandard": "c++17",
20+
"configurationProvider": "b2.catkin_tools"
21+
}
22+
],
23+
"version": 4
24+
}

.vscode/settings.json

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
{
2+
"files.associations": {
3+
"cctype": "cpp",
4+
"cstddef": "cpp",
5+
"cstdlib": "cpp",
6+
"cstring": "cpp",
7+
"cwchar": "cpp",
8+
"cwctype": "cpp",
9+
"array": "cpp",
10+
"atomic": "cpp",
11+
"bit": "cpp",
12+
"*.tcc": "cpp",
13+
"compare": "cpp",
14+
"concepts": "cpp",
15+
"cstdint": "cpp",
16+
"map": "cpp",
17+
"set": "cpp",
18+
"unordered_map": "cpp",
19+
"unordered_set": "cpp",
20+
"vector": "cpp",
21+
"exception": "cpp",
22+
"algorithm": "cpp",
23+
"functional": "cpp",
24+
"memory": "cpp",
25+
"memory_resource": "cpp",
26+
"random": "cpp",
27+
"string": "cpp",
28+
"string_view": "cpp",
29+
"tuple": "cpp",
30+
"type_traits": "cpp",
31+
"utility": "cpp",
32+
"initializer_list": "cpp",
33+
"iosfwd": "cpp",
34+
"iostream": "cpp",
35+
"istream": "cpp",
36+
"new": "cpp",
37+
"ostream": "cpp",
38+
"sstream": "cpp",
39+
"stdexcept": "cpp",
40+
"streambuf": "cpp",
41+
"typeinfo": "cpp",
42+
"strstream": "cpp",
43+
"bitset": "cpp",
44+
"chrono": "cpp",
45+
"clocale": "cpp",
46+
"cmath": "cpp",
47+
"complex": "cpp",
48+
"condition_variable": "cpp",
49+
"cstdarg": "cpp",
50+
"cstdio": "cpp",
51+
"ctime": "cpp",
52+
"deque": "cpp",
53+
"list": "cpp",
54+
"fstream": "cpp",
55+
"iomanip": "cpp",
56+
"limits": "cpp",
57+
"mutex": "cpp",
58+
"optional": "cpp",
59+
"ratio": "cpp",
60+
"system_error": "cpp",
61+
"thread": "cpp",
62+
"typeindex": "cpp",
63+
"variant": "cpp"
64+
},
65+
"python.autoComplete.extraPaths": [
66+
"${workspaceFolder}/devel/lib/python3/dist-packages",
67+
"/opt/ros/noetic/lib/python3/dist-packages"
68+
],
69+
"python.analysis.extraPaths": [
70+
"${workspaceFolder}/devel/lib/python3/dist-packages",
71+
"/opt/ros/noetic/lib/python3/dist-packages"
72+
],
73+
"cmake.configureOnOpen": false
74+
}

scripts/create_bringup.sh

+9
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,15 @@ WORKSPACE_SRC=${PATH_WS}/${CONFIG_NAME}_cws/src
9898
PACKAGE_DIR=${PATH_WS}/${CONFIG_NAME}_cws/src/${CONFIG_NAME}
9999
BRINGUP_DIR=${PATH_WS}/${CONFIG_NAME}_cws/src/${CONFIG_NAME}/${CONFIG_NAME}_bringup
100100

101+
# check if executed in correct folder
102+
if [ ! -d 'scripts' ]; then
103+
echo "${COL_ERR}No 'scripts' folder found, please execute this script in the root directory of the flightstack_cws.${NC}"
104+
exit 1;
105+
elif [ ! -f 'scripts/create_bringup.sh' ]
106+
echo "${COL_ERR}No 'create_bringup' script found within the './scripts' folder, please execute this script in the root directory of the flightstack_cws.${NC}"
107+
exit 1;
108+
fi
109+
101110
# create directory and copy template
102111
mkdir -p ${PACKAGE_DIR}
103112
rsync -avPh $(pwd)/src/flightstack/template_config/ ${PACKAGE_DIR}

src/data_recorder

src/flightstack/flightstack_bringup/configs/global/fs_vars.env

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#!/usr/bin/env bash
22

3+
# path related variables
4+
export FS_SCRIPTS_PATH=$(rospack find flightstack_scripts)
5+
export FS_VARS_FILE=$(rospack find flightstack_bringup)/configs/global/fs_vars.env
6+
37
# object tracking related variables
48
export FS_OPTITRACK_OBJECT_NAME="cnsuav"
59

@@ -14,7 +18,7 @@ export FS_RECORD_ADD_DEV1_SENSOR=()
1418
export FS_RECORD_ADD_DEV1_CAM=()
1519
# e.g. these topics require the installation of the matrixvision driver
1620
# see https://github.com/ethz-asl/matrixvision_camera
17-
# export FS_RECORD_ADD_DEV1_CMAS=(
21+
# export FS_RECORD_ADD_DEV1_CAM=(
1822
# "/camera/image_raw"
1923
# "/camera/camera_info"
2024
# )

src/flightstack/flightstack_bringup/launch/fs_estimation.launch

+11-6
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ You can contact the authors at <[email protected]>, <christian.brommer@ie
1414

1515
<launch>
1616
<arg name="dev_id" default="1" />
17+
<arg name="ros_ns" default="" />
18+
19+
<!-- topic prefix for namespace -->
20+
<arg name="topic_prefix" value="/$(arg ros_ns)" if="$(eval arg('ros_ns') != '')" />
21+
<arg name="topic_prefix" value="" unless="$(eval arg('ros_ns') != '')" />
1722

1823
<arg name="optitrack_object_name" default="$(env FS_OPTITRACK_OBJECT_NAME)" />
1924

@@ -22,12 +27,12 @@ You can contact the authors at <[email protected]>, <christian.brommer@ie
2227
<arg name="use_px4_bridge" default="False" />
2328

2429
<!-- MaRS arguments -->
25-
<arg name="mars_imu_in" default="/mavros/imu/data_raw" />
26-
<arg name="mars_transform_in" default="/$(arg optitrack_object_name)/vrpn_client/raw_transform" />
27-
<arg name="mars_pose_out" default="/mavros/vision_pose/pose" />
28-
<arg name="mars_lite_ext_state_out" default="/mavros/external_state_lite/external_state_estimate_lite" />
29-
<arg name="mars_gps_pos_in" default="/mavros/global_position/raw/fix" />
30-
<arg name="mars_gps_vel_in" default="/mavros/global_position/raw/gps_vel" />
30+
<arg name="mars_imu_in" default="$(arg topic_prefix)/mavros/imu/data_raw" />
31+
<arg name="mars_transform_in" default="$(arg topic_prefix)/$(arg optitrack_object_name)/vrpn_client/raw_transform" />
32+
<arg name="mars_pose_out" default="$(arg topic_prefix)/mavros/vision_pose/pose" />
33+
<arg name="mars_lite_ext_state_out" default="$(arg topic_prefix)/mavros/external_state_lite/external_state_estimate_lite" />
34+
<arg name="mars_gps_pos_in" default="$(arg topic_prefix)/mavros/global_position/raw/fix" />
35+
<arg name="mars_gps_vel_in" default="$(arg topic_prefix)/mavros/global_position/raw/gps_vel" />
3136

3237

3338
<arg name="mars_config_in" default="$(find mars_ros)/launch/config/pose_config.yaml" unless="$(arg use_gps)" />
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
Copyright (C) 2023 Martin Scheiber,
4+
Control of Networked Systems Group, University of Klagenfurt, Austria.
5+
6+
All rights reserved.
7+
8+
This software is licensed under the terms of the BSD-2-Clause-License with
9+
no commercial use allowed, the full terms of which are made available
10+
in the LICENSE file. No license in patents is granted.
11+
12+
You can contact the author at <[email protected]>
13+
-->
14+
<launch>
15+
<arg name="dev_id" default="1" />
16+
<arg name="ros_namespace" default="cnsuav" />
17+
18+
<!-- parameters required for launching with fs_dev scripts -->
19+
<arg name="dev_type" default="xu4" />
20+
<arg name="use_gps" default="False" />
21+
<arg name="rec_script_file" default="$(find flightstack_scripts)/record_scripts/record_full.sh" />
22+
<arg name="store_script_file" default="$(find flightstack_scripts)/store_scripts/safe_merge_data_single_dev.sh" />
23+
<arg name="estimator_init_service_name" default="/$(arg ros_namespace)/$(env FS_ESTIMATOR_NODE_NAME)/init_service" />
24+
<arg name="config_filepath" default="$(find flightstack_bringup)/configs/autonomy/config_dh.yaml" />
25+
26+
<arg name="launch_file" default="all" />
27+
<!-- choose between 'all', 'estimation', 'navigation', 'operator', 'recording', 'saftey', and 'sensors'-->
28+
29+
<group ns="$(arg ros_namespace)">
30+
<!-- ESTIMATION -->
31+
<include file="$(find flightstack_bringup)/launch/fs_estimation.launch"
32+
if="$(eval arg('launch_file') == 'all' or arg('launch_file') == 'estimation')">
33+
<arg name="dev_id" value="$(arg dev_id)" />
34+
<arg name="ros_ns" value="$(arg ros_namespace)" />
35+
36+
<arg name="use_gps" value="$(arg use_gps)" />
37+
</include>
38+
39+
<!-- NAVIGATION -->
40+
<include file="$(find flightstack_bringup)/launch/fs_navigation.launch"
41+
if="$(eval arg('launch_file') == 'all' or arg('launch_file') == 'navigation')">
42+
<arg name="dev_id" value="$(arg dev_id)" />
43+
<arg name="ros_ns" value="$(arg ros_namespace)" />
44+
45+
<arg name="use_gps" value="$(arg use_gps)" />
46+
</include>
47+
48+
<!-- OPERATOR -->
49+
<include file="$(find flightstack_bringup)/launch/fs_operator.launch"
50+
if="$(eval arg('launch_file') == 'all' or arg('launch_file') == 'operator')">
51+
<arg name="dev_id" value="$(arg dev_id)" />
52+
<arg name="ros_ns" value="$(arg ros_namespace)" />
53+
54+
<arg name="estimator_init_service_name" value="$(arg estimator_init_service_name)" />
55+
<arg name="config_filepath" value="$(arg config_filepath)" />
56+
</include>
57+
58+
<!-- RECORDING -->
59+
<include file="$(find flightstack_bringup)/launch/fs_recording.launch"
60+
if="$(eval arg('launch_file') == 'all' or arg('launch_file') == 'recording')">
61+
<arg name="dev_id" value="$(arg dev_id)" />
62+
<arg name="ros_ns" value="$(arg ros_namespace)" />
63+
</include>
64+
65+
<!-- SAFETY -->
66+
<include file="$(find flightstack_bringup)/launch/fs_safety.launch"
67+
if="$(eval arg('launch_file') == 'all' or arg('launch_file') == 'safety')">
68+
<arg name="dev_id" value="$(arg dev_id)" />
69+
<arg name="ros_ns" value="$(arg ros_namespace)" />
70+
71+
<arg name="use_gps" value="$(arg use_gps)" />
72+
</include>
73+
74+
<!-- SENSORS -->
75+
<include file="$(find flightstack_bringup)/launch/fs_sensors.launch"
76+
if="$(eval arg('launch_file') == 'all' or arg('launch_file') == 'sensors')">
77+
<arg name="dev_id" value="$(arg dev_id)" />
78+
<arg name="ros_ns" value="$(arg ros_namespace)" />
79+
80+
<arg name="use_gps" value="$(arg use_gps)" />
81+
</include>
82+
</group>
83+
</launch>

src/flightstack/flightstack_bringup/launch/fs_navigation.launch

+20-2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ You can contact the authors at <[email protected]>, <christian.brommer@ie
1414

1515
<launch>
1616
<arg name="dev_id" default="1" />
17+
<arg name="ros_ns" default="" />
18+
19+
<!-- topic prefix for namespace -->
20+
<arg name="topic_prefix" value="/$(arg ros_ns)" if="$(eval arg('ros_ns') != '')" />
21+
<arg name="topic_prefix" value="" unless="$(eval arg('ros_ns') != '')" />
1722

1823
<!-- system args -->
1924
<arg name="use_gps" default="False" /> <!-- INFO(scm): kept for legacy reasons -->
@@ -37,8 +42,21 @@ You can contact the authors at <[email protected]>, <christian.brommer@ie
3742

3843
<!-- odometry in -->
3944
<arg name="use_odom" default="True" />
40-
<arg name="topic_odom_in" default="/$(env FS_ESTIMATOR_NODE_NAME)/odom_state_out" />
41-
<arg name="topic_pose_in" default="/$(env FS_ESTIMATOR_NODE_NAME)/pose_state_out" />
45+
<arg name="topic_odom_in" default="$(arg topic_prefix)/$(env FS_ESTIMATOR_NODE_NAME)/odom_state_out" />
46+
<arg name="topic_pose_in" default="$(arg topic_prefix)/$(env FS_ESTIMATOR_NODE_NAME)/pose_state_out" />
47+
48+
<!-- mavros topics and services (for NS remapping) - value-based only -->
49+
<arg name="ms_mavros_topic_state_in" value="$(arg topic_prefix)/mavros/state" />
50+
<arg name="ms_mavros_topic_extended_state_in" value="$(arg topic_prefix)/mavros/extended_state" />
51+
<arg name="ms_mavros_topic_local_pose_in" value="$(arg topic_prefix)/mavros/local_position/pose" />
52+
<arg name="ms_autonomy_topic_request_in" value="$(arg topic_prefix)/autonomy/request" />
53+
<arg name="ms_mavros_topic_setpoint_out" value="$(arg topic_prefix)/mavros/setpoint_position/local" />
54+
<arg name="ms_autonomy_topic_response_out" value="$(arg topic_prefix)/autonomy/response" />
55+
<arg name="ms_mavros_service_arming_out" value="$(arg topic_prefix)/mavros/cmd/arming" />
56+
<arg name="ms_mavros_service_command_out" value="$(arg topic_prefix)/mavros/cmd/command" />
57+
<arg name="ms_mavros_service_land_out" value="$(arg topic_prefix)/mavros/cmd/land" />
58+
<arg name="ms_mavros_service_set_mode_out" value="$(arg topic_prefix)/mavros/set_mode" />
59+
<!-- TODO(scm): might not be required as PHN/NH difference already sets these values correctly -->
4260

4361
<group if="$(eval arg('dev_id') == 1)">
4462
<include file="$(find mission_sequencer)/launch/mission_sequencer.launch">

0 commit comments

Comments
 (0)