Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
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
3 changes: 2 additions & 1 deletion AUTHORS
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Rafael Pérez Seguí
Miguel Fernández Cortizas
Pedro Arias Pérez
David Pérez Saura
David Pérez Saura
Javier Melero Deza
19 changes: 9 additions & 10 deletions launch_as2.bash
Original file line number Diff line number Diff line change
Expand Up @@ -72,28 +72,27 @@ done

for ns in "${drone_ns[@]}"
do
if [[ ${ns} == ${drone_ns[0]} ]]; then
base_launch="true"
else
base_launch="false"
fi

tmuxinator start -n ${ns} -p utils/session.yml drone_namespace=${ns} gps=${gps} simulation=${simulated} estimator_plugin=${estimator_plugin} &
tmuxinator start -n ${ns} -p tmuxinator/session.yml drone_namespace=${ns} gps=${gps} simulation=${simulated} estimator_plugin=${estimator_plugin} &
wait
done

if [[ ${estimator_plugin} == "mocap_pose" ]]; then
tmuxinator start -n mocap -p tmuxinator/mocap.yml &
wait
fi

if [[ ${record_rosbag} == "true" ]]; then
tmuxinator start -n rosbag -p utils/rosbag.yml drone_namespace=$(list_to_string "${drone_ns[@]}") &
tmuxinator start -n rosbag -p tmuxinator/rosbag.yml drone_namespace=$(list_to_string "${drone_ns[@]}") &
wait
fi

if [[ ${launch_keyboard_teleop} == "true" ]]; then
tmuxinator start -n keyboard_teleop -p utils/keyboard_teleop.yml simulation=true drone_namespace=$(list_to_string "${drone_ns[@]}") &
tmuxinator start -n keyboard_teleop -p tmuxinator/keyboard_teleop.yml simulation=true drone_namespace=$(list_to_string "${drone_ns[@]}") &
wait
fi

if [[ ${simulated} == "true" ]]; then
tmuxinator start -n gazebo -p utils/gazebo.yml simulation_config=${simulation_config} &
tmuxinator start -n gazebo -p tmuxinator/gazebo.yml simulation_config=${simulation_config} &
wait
fi

Expand Down
2 changes: 2 additions & 0 deletions mission.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ def drone_run(drone_interface: DroneInterface, simulation=False):

##### ARM OFFBOARD #####
if simulation:
print("Arm")
Copy link
Member

@miferco97 miferco97 May 23, 2023

Choose a reason for hiding this comment

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

These prints are in the opposite order

drone_interface.offboard()
sleep(sleep_time)
print("Offboard")
drone_interface.arm()
sleep(sleep_time)

Expand Down
1 change: 1 addition & 0 deletions real_config/state_estimator_mocap.yaml
Copy link
Member

Choose a reason for hiding this comment

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

what is this? a workaround for not having errors?

Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/**:
ros__parameters:
none: false
16 changes: 14 additions & 2 deletions stop.bash
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,20 @@ if [[ -n "$TMUX" ]]; then
current_session=$(tmux display-message -p '#S')
fi

# Kill gazebo
pkill -9 -f "gzclient" < /dev/null
# Send Ctrl+C signal to each window of each session
for session in "${tmux_session_list[@]}"; do
# Check if session exists
if tmux has-session -t "$session" 2>/dev/null; then
# Get the list of windows in the session
windows=($(tmux list-windows -t "$session" -F "#{window_index}"))
# Iterate through each window and send Ctrl+C
for window in "${windows[@]}"; do
# Send Ctrl+C to the window
tmux send-keys -t "$session:$window" C-c
sleep 0.1 # Add a small delay to allow the signal to be processed
done
fi
done

# Kill all tmux sessions from the list except for the current one
for session in "${tmux_session_list[@]}"; do
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.