<commit_before>#!/usr/bin/env python

import rospy
import crazyflie
import time
import uav_trajectory

if __name__ == '__main__':
    rospy.init_node('test_high_level')

    cf = crazyflie.Crazyflie("crazyflie", "/vicon/crazyflie/crazyflie")

    cf.setParam("commander/enHighLevel", 1)

    # cf.takeoff(targetHeight = 0.5, duration = 2.0)
    # time.sleep(3.0)

    # cf.goTo(goal = [0.5, 0.0, 0.0], yaw=0.2, duration = 2.0, relative = True)
    # time.sleep(3.0)

    # cf.land(targetHeight = 0.0, duration = 2.0)

    traj1 = uav_trajectory.Trajectory()
    traj1.loadcsv("takeoff.csv")

    traj2 = uav_trajectory.Trajectory()
    traj2.loadcsv("figure8.csv")

    print(traj1.duration)

    cf.uploadTrajectory(0, 0, traj1)
    cf.uploadTrajectory(1, len(traj1.polynomials), traj2)

    cf.startTrajectory(0, timescale=1.0)
    time.sleep(traj1.duration * 2.0)

    cf.startTrajectory(1, timescale=2.0)
    time.sleep(traj2.duration * 2.0)
<commit_msg>Update test_high_level<commit_after>#!/usr/bin/env python

import rospy
import crazyflie
import time
import uav_trajectory

if __name__ == '__main__':
    rospy.init_node('test_high_level')

    cf = crazyflie.Crazyflie("crazyflie", "/vicon/crazyflie/crazyflie")

    cf.setParam("commander/enHighLevel", 1)
    cf.setParam("stabilizer/estimator", 2) # Use EKF
    cf.setParam("stabilizer/controller", 2) # Use mellinger controller

    cf.setParam("kalman/initialX", 0)
    cf.setParam("kalman/initialY", 0)
    cf.setParam("kalman/initialZ", 0)

    cf.setParam("kalman/resetEstimation", 1)

    # cf.takeoff(targetHeight = 0.5, duration = 2.0)
    # time.sleep(3.0)

    # cf.goTo(goal = [0.5, 0.0, 0.0], yaw=0.2, duration = 2.0, relative = True)
    # time.sleep(3.0)

    # cf.land(targetHeight = 0.0, duration = 2.0)

    traj1 = uav_trajectory.Trajectory()
    traj1.loadcsv("takeoff.csv")

    traj2 = uav_trajectory.Trajectory()
    traj2.loadcsv("figure8.csv")

    print(traj1.duration)

    cf.uploadTrajectory(0, 0, traj1)
    cf.uploadTrajectory(1, len(traj1.polynomials), traj2)

    cf.startTrajectory(0, timescale=1.0)
    time.sleep(traj1.duration * 2.0)

    cf.startTrajectory(1, timescale=2.0)
    time.sleep(traj2.duration * 2.0)

{'fraction_non_alphanumeric': 0.151131221719457, 'fraction_numerical': 0.04524886877828054, 'mean_word_length': 3.577639751552795, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5513889', 'n_tokens_mistral': 970, 'n_tokens_neox': 905, 'n_words': 136}