-
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
20 changed files
with
1,611 additions
and
17 deletions.
There are no files selected for viewing
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
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
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
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
25 changes: 25 additions & 0 deletions
25
ros_packages/mrs_uav_gazebo_simulation/tmux/one_drone_vio/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,25 @@ | ||
mrs_uav_managers: | ||
|
||
estimation_manager: | ||
|
||
# loaded state estimator plugins | ||
state_estimators: [ | ||
"gps_garmin", | ||
"gps_baro", | ||
] | ||
|
||
initial_state_estimator: "gps_garmin" # 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" # more robust | ||
# controller: "Se3Controller" # more precise | ||
tracker: "MpcTracker" |
15 changes: 15 additions & 0 deletions
15
ros_packages/mrs_uav_gazebo_simulation/tmux/one_drone_vio/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_vio/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_vio/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 |
115 changes: 115 additions & 0 deletions
115
ros_packages/mrs_uav_gazebo_simulation/tmux/one_drone_vio/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,115 @@ | ||
[ | ||
{ | ||
"border": "normal", | ||
"floating": "auto_off", | ||
"fullscreen_mode": 0, | ||
"layout": "splith", | ||
"percent": 0.25, | ||
"type": "con", | ||
"nodes": [ | ||
{ | ||
"border": "normal", | ||
"floating": "auto_off", | ||
"layout": "splith", | ||
"percent": 1, | ||
"type": "con", | ||
"nodes": [ | ||
{ | ||
"border": "normal", | ||
"floating": "auto_off", | ||
"layout": "splitv", | ||
"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": "rqt_image_view__ImageView - rqt", | ||
"percent": 0.5, | ||
"swallows": [ | ||
{ | ||
"instance": "^rqt_image_view$" | ||
} | ||
], | ||
"type": "con" | ||
} | ||
] | ||
}, | ||
{ | ||
"border": "normal", | ||
"floating": "auto_off", | ||
"layout": "splitv", | ||
"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": "default.rviz* - RViz", | ||
"percent": 0.5, | ||
"swallows": [ | ||
{ | ||
"instance": "^rviz$" | ||
} | ||
], | ||
"type": "con" | ||
}, | ||
{ | ||
"border": "pixel", | ||
"current_border_width": 3, | ||
"floating": "auto_off", | ||
"geometry": { | ||
"height": 460, | ||
"width": 724, | ||
"x": 0, | ||
"y": 0 | ||
}, | ||
"name": "runVim session.yml", | ||
"percent": 0.5, | ||
"swallows": [ | ||
{ | ||
"instance": "^urxvt$" | ||
} | ||
], | ||
"type": "con" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] |
60 changes: 60 additions & 0 deletions
60
ros_packages/mrs_uav_gazebo_simulation/tmux/one_drone_vio/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,60 @@ | ||
# 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=f330 | ||
startup_window: status | ||
windows: | ||
- roscore: | ||
layout: tiled | ||
panes: | ||
- roscore | ||
- gazebo: | ||
layout: tiled | ||
panes: | ||
- waitForRos; roslaunch mrs_uav_gazebo_simulation simulation.launch world_name:=mrs_city gui:=true | ||
- waitForGazebo; rosservice call /mrs_drone_spawner/spawn "1 $UAV_TYPE --enable-rangefinder --enable-vio" | ||
- 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 | ||
- vio_data: | ||
layout: tiled | ||
panes: | ||
- waitForHw; rostopic echo /$UAV_NAME/vio/imu | ||
- waitForHw; rosrun rqt_image_view rqt_image_view /$UAV_NAME/vio/camera/image_raw | ||
- 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 | ||
- 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_vio/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 |
Oops, something went wrong.