Skip to content

Commit

Permalink
Hba script created for evaluation
Browse files Browse the repository at this point in the history
  • Loading branch information
MunozBanon committed Oct 2, 2024
1 parent ed3218d commit 243467e
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions scripts/localisation_benchmark/hba.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import sys
import time

import libtmux

if __name__ == "__main__":

# TODO: put it in def an get path from arg.

path = '/home/oxford_spires_dataset/data/'
sequence = '2024-03-18-chrst-chrch-01'
seq_path = path + sequence

server = libtmux.Server()
server.cmd('new-session', '-d', '-P', '-F#{session_id}')
session = server.sessions[0]
window_1 = session.new_window(attach=False, window_name="launch fast_lio_slam")
pane_1 = window_1.panes.get()
pane_1.send_keys('cd /home/catkin_ws/')
pane_1.send_keys('source devel/setup.bash')
pane_1.send_keys('roslaunch hba {}.launch'.format(sequence))


# Check if the process is "iteration complete"
print("HBA launched!! - {}.launch".format(sequence))
flag = False
while (1):
pane_1.clear()
time.sleep(1)
cap_curr = pane_1.capture_pane()
# print(cap_curr)
for line in cap_curr:
if "Residual" in line:
print(line)
elif "pgo complete" in line:
print(line)
flag = True
if flag:
break

time.sleep(3)
print("PROCESS FINISHED!!")
print("Output in: {}/output_slam/hba/hba_poses_robotics.csv".format(sequence))

# TODO: Copy to output folder

# TODO: Transform to TUM format


server.kill()

0 comments on commit 243467e

Please sign in to comment.