From d93ce448f450c68a8e9053167d9a54e93bdbe4d3 Mon Sep 17 00:00:00 2001 From: architjaiswal Date: Wed, 2 Feb 2022 16:06:00 -0600 Subject: [PATCH] fixed code --- controller_learning/iterative_learning_trajectories.py | 2 +- .../src/ControllerLearning/TrajectoryBase.py | 3 +++ .../src/ControllerLearning/TrajectoryLearning.py | 8 +++++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/controller_learning/iterative_learning_trajectories.py b/controller_learning/iterative_learning_trajectories.py index 9eea607..7c626ba 100755 --- a/controller_learning/iterative_learning_trajectories.py +++ b/controller_learning/iterative_learning_trajectories.py @@ -6,7 +6,7 @@ import time import numpy as np import rospy -from ControllerLearning import TrajectoryLearning +from src.ControllerLearning import TrajectoryLearning from std_msgs.msg import Bool from common import update_mpc_params, setup_sim, random_replace, initialize_vio diff --git a/controller_learning/src/ControllerLearning/TrajectoryBase.py b/controller_learning/src/ControllerLearning/TrajectoryBase.py index eaa1ae0..ec1a0f9 100755 --- a/controller_learning/src/ControllerLearning/TrajectoryBase.py +++ b/controller_learning/src/ControllerLearning/TrajectoryBase.py @@ -9,6 +9,9 @@ import numpy as np import rospy from nav_msgs.msg import Odometry +# from quadrotor_msgs.msg import ControlCommand +import sys +sys.path.insert(0,'/home/archit/drone_acrobatics_ws/catkin_dda/devel/lib/python3/dist-packages') from quadrotor_msgs.msg import ControlCommand from quadrotor_msgs.msg import TrajectoryPoint from sensor_msgs.msg import PointCloud diff --git a/controller_learning/src/ControllerLearning/TrajectoryLearning.py b/controller_learning/src/ControllerLearning/TrajectoryLearning.py index 4f02bfb..46d8d8b 100755 --- a/controller_learning/src/ControllerLearning/TrajectoryLearning.py +++ b/controller_learning/src/ControllerLearning/TrajectoryLearning.py @@ -7,14 +7,20 @@ import numpy as np import rospy from nav_msgs.msg import Odometry -from quadrotor_msgs.msg import ControlCommand + from std_msgs.msg import Bool from std_msgs.msg import Empty +import sys +sys.path.insert(1,'/home/archit/drone_acrobatics_ws/catkin_dda/devel/lib/python3/dist-packages') +from quadrotor_msgs.msg import ControlCommand + from .TrajectoryBase import TrajectoryBase, TRACK_NUM_NORMALIZE + + class TrajectoryLearning(TrajectoryBase): def __init__(self, config, mode): super(TrajectoryLearning, self).__init__(config, mode)