-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
280 additions
and
0 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
ros_packages/mrs_uav_gazebo_simulation/tmux/one_drone_3dlidar/config/custom_config.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
mrs_uav_managers: | ||
|
||
estimation_manager: | ||
|
||
# loaded state estimator plugins | ||
state_estimators: [ | ||
"gps_garmin", | ||
"gps_baro", | ||
"ground_truth", | ||
] | ||
|
||
initial_state_estimator: "gps_baro" # will be used as the first state estimator | ||
agl_height_estimator: "garmin_agl" # only slightly filtered height for checking min height (not used in control feedback) | ||
|
||
uav_manager: | ||
|
||
takeoff: | ||
|
||
during_takeoff: | ||
controller: "MpcController" | ||
tracker: "LandoffTracker" | ||
|
||
after_takeoff: | ||
controller: "MpcController" | ||
# controller: "Se3Controller" | ||
tracker: "MpcTracker" |
15 changes: 15 additions & 0 deletions
15
ros_packages/mrs_uav_gazebo_simulation/tmux/one_drone_3dlidar/config/network_config.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# 1. This list is used by NimbroNetwork for mutual communication of the UAVs | ||
# The names of the robots have to match hostnames described in /etc/hosts. | ||
# | ||
# 2. This list is used by MpcTracker for mutual collision avoidance of the UAVs. | ||
# The names should match the true "UAV_NAMES" (the topic prefixes). | ||
# | ||
# network_config:=~/config/network_config.yaml | ||
# | ||
# to the core.launch and nimbro.launch. | ||
|
||
network: | ||
|
||
robot_names: [ | ||
uav1, | ||
] |
34 changes: 34 additions & 0 deletions
34
ros_packages/mrs_uav_gazebo_simulation/tmux/one_drone_3dlidar/config/world_config.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
world_origin: | ||
|
||
units: "LATLON" # {"UTM, "LATLON"} | ||
|
||
origin_x: 47.397743 | ||
origin_y: 8.545594 | ||
|
||
safety_area: | ||
|
||
enabled: true | ||
|
||
horizontal: | ||
|
||
# the frame of reference in which the points are expressed | ||
frame_name: "world_origin" | ||
|
||
# polygon | ||
# | ||
# x, y [m] for any frame_name except latlon_origin | ||
# x = latitude, y = longitude [deg] for frame_name=="latlon_origin" | ||
points: [ | ||
-50, -50, | ||
50, -50, | ||
50, 50, | ||
-50, 50, | ||
] | ||
|
||
vertical: | ||
|
||
# the frame of reference in which the max&min z is expressed | ||
frame_name: "world_origin" | ||
|
||
max_z: 15.0 | ||
min_z: 0.5 |
14 changes: 14 additions & 0 deletions
14
ros_packages/mrs_uav_gazebo_simulation/tmux/one_drone_3dlidar/kill.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
|
||
# Absolute path to this script. /home/user/bin/foo.sh | ||
SCRIPT=$(readlink -f $0) | ||
# Absolute path this script is in. /home/user/bin | ||
SCRIPTPATH=`dirname $SCRIPT` | ||
cd "$SCRIPTPATH" | ||
|
||
export TMUX_SESSION_NAME=simulation | ||
export TMUX_SOCKET_NAME=mrs | ||
|
||
# just attach to the session | ||
tmux -L $TMUX_SOCKET_NAME split-window -t $TMUX_SESSION_NAME | ||
tmux -L $TMUX_SOCKET_NAME send-keys -t $TMUX_SESSION_NAME "sleep 1; tmux list-panes -s -F \"#{pane_pid} #{pane_current_command}\" | grep -v tmux | cut -d\" \" -f1 | while read in; do killp \$in; done; exit" ENTER |
105 changes: 105 additions & 0 deletions
105
ros_packages/mrs_uav_gazebo_simulation/tmux/one_drone_3dlidar/layout.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
[ | ||
{ | ||
"border": "normal", | ||
"floating": "auto_off", | ||
"fullscreen_mode": 0, | ||
"layout": "splith", | ||
"percent": 0.5, | ||
"type": "con", | ||
"nodes": [ | ||
{ | ||
"border": "normal", | ||
"floating": "auto_off", | ||
"layout": "splith", | ||
"percent": 1, | ||
"type": "con", | ||
"nodes": [ | ||
{ | ||
"border": "normal", | ||
"floating": "auto_off", | ||
"layout": "splitv", | ||
"percent": 1, | ||
"type": "con", | ||
"nodes": [ | ||
{ | ||
"border": "normal", | ||
"floating": "auto_off", | ||
"layout": "splith", | ||
"percent": 0.5, | ||
"type": "con", | ||
"nodes": [ | ||
{ | ||
"border": "pixel", | ||
"current_border_width": 3, | ||
"floating": "auto_off", | ||
"geometry": { | ||
"height": 460, | ||
"width": 724, | ||
"x": 0, | ||
"y": 0 | ||
}, | ||
"name": "Gazebo", | ||
"percent": 0.5, | ||
"swallows": [ | ||
{ | ||
"instance": "^gazebo$" | ||
} | ||
], | ||
"type": "con" | ||
}, | ||
{ | ||
"border": "pixel", | ||
"current_border_width": 3, | ||
"floating": "auto_off", | ||
"geometry": { | ||
"height": 460, | ||
"width": 724, | ||
"x": 0, | ||
"y": 0 | ||
}, | ||
"name": "default_simulation.rviz* - RViz", | ||
"percent": 0.5, | ||
"swallows": [ | ||
{ | ||
"instance": "^rviz$" | ||
} | ||
], | ||
"type": "con" | ||
} | ||
] | ||
}, | ||
{ | ||
"border": "normal", | ||
"floating": "auto_off", | ||
"layout": "splith", | ||
"percent": 0.5, | ||
"type": "con", | ||
"nodes": [ | ||
{ | ||
"border": "pixel", | ||
"current_border_width": 3, | ||
"floating": "auto_off", | ||
"geometry": { | ||
"height": 460, | ||
"width": 724, | ||
"x": 0, | ||
"y": 0 | ||
}, | ||
"name": "./start.sh", | ||
"percent": 1, | ||
"swallows": [ | ||
{ | ||
"instance": "^urxvt$" | ||
} | ||
], | ||
"type": "con" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] |
59 changes: 59 additions & 0 deletions
59
ros_packages/mrs_uav_gazebo_simulation/tmux/one_drone_3dlidar/session.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# do not modify these | ||
root: ./ | ||
name: simulation | ||
socket_name: mrs | ||
attach: false | ||
tmux_options: -f /etc/ctu-mrs/tmux.conf | ||
# you can modify these | ||
pre_window: export UAV_NAME=uav1; export RUN_TYPE=simulation; export UAV_TYPE=x500 | ||
startup_window: status | ||
windows: | ||
- roscore: | ||
layout: tiled | ||
panes: | ||
- roscore | ||
- gazebo: | ||
layout: tiled | ||
panes: | ||
- waitForRos; roslaunch mrs_uav_gazebo_simulation simulation.launch world_name:=forest gui:=true | ||
- waitForControl; gz camera -c gzclient_camera -f $UAV_NAME; history -s gz camera -c gzclient_camera -f $UAV_NAME | ||
- status: | ||
layout: tiled | ||
panes: | ||
- waitForHw; roslaunch mrs_uav_status status.launch | ||
- spawn: | ||
layout: tiled | ||
panes: | ||
# the horizontal-samples decreases the base sample rate of 20480 (=2048 points per linescan) to a user-defined value | ||
- waitForGazebo; rosservice call /mrs_drone_spawner/spawn "1 $UAV_TYPE --enable-rangefinder --enable-ground-truth --enable-ouster --ouster-model OS0-128 --use-gpu-ray --horizontal-samples 1280" | ||
- hw_api: | ||
layout: tiled | ||
panes: | ||
- waitForTime; roslaunch mrs_uav_px4_api api.launch | ||
- core: | ||
layout: tiled | ||
panes: | ||
- waitForHw; roslaunch mrs_uav_core core.launch | ||
platform_config:=`rospack find mrs_uav_gazebo_simulation`/config/mrs_uav_system/$UAV_TYPE.yaml | ||
custom_config:=./config/custom_config.yaml | ||
world_config:=./config/world_config.yaml | ||
network_config:=./config/network_config.yaml | ||
- takeoff: | ||
layout: tiled | ||
panes: | ||
- waitForHw; roslaunch mrs_uav_autostart automatic_start.launch | ||
- 'waitForControl; rosservice call /$UAV_NAME/hw_api/arming 1; sleep 2; rosservice call /$UAV_NAME/hw_api/offboard' | ||
- goto: | ||
layout: tiled | ||
panes: | ||
- 'history -s rosservice call /$UAV_NAME/control_manager/goto \"goal: \[0.0, 10.0, 1.5, 0.0\]\"' | ||
- rviz: | ||
layout: tiled | ||
panes: | ||
- waitForControl; roslaunch mrs_uav_core rviz.launch | ||
- waitForControl; roslaunch mrs_rviz_plugins load_robot.launch | ||
- waitForTime; waitForControl; roslaunch mrs_rviz_plugins rviz_interface.launch | ||
- layout: | ||
layout: tiled | ||
panes: | ||
- waitForControl; sleep 3; ~/.i3/layout_manager.sh ./layout.json |
27 changes: 27 additions & 0 deletions
27
ros_packages/mrs_uav_gazebo_simulation/tmux/one_drone_3dlidar/start.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash | ||
|
||
# Absolute path to this script. /home/user/bin/foo.sh | ||
SCRIPT=$(readlink -f $0) | ||
# Absolute path this script is in. /home/user/bin | ||
SCRIPTPATH=`dirname $SCRIPT` | ||
cd "$SCRIPTPATH" | ||
|
||
export TMUX_SESSION_NAME=simulation | ||
export TMUX_SOCKET_NAME=mrs | ||
|
||
# start tmuxinator | ||
tmuxinator start -p ./session.yml | ||
|
||
# if we are not in tmux | ||
if [ -z $TMUX ]; then | ||
|
||
# just attach to the session | ||
tmux -L $TMUX_SOCKET_NAME a -t $TMUX_SESSION_NAME | ||
|
||
# if we are in tmux | ||
else | ||
|
||
# switch to the newly-started session | ||
tmux detach-client -E "tmux -L $TMUX_SOCKET_NAME a -t $TMUX_SESSION_NAME" | ||
|
||
fi |