Commit 84e32781 authored by Jakob Dommaschk's avatar Jakob Dommaschk
Browse files

Adjust camera orientation

parent 2334f881
......@@ -25,6 +25,7 @@ class VelocityCommander(Node):
# class variables
self.t_sync = 0
self.vel = Vector3()
self.pub_counter = 0
# subscription callbacks
self.sub_timesync = self.create_subscription(
......@@ -49,6 +50,10 @@ class VelocityCommander(Node):
def timer_callback(self):
self.pub_offb_control_mode()
self.pub_trajectory_setpoint()
# stop counter
if self.pub_counter < 11:
self.pub_counter = self.pub_counter + 1
def pub_offb_control_mode(self):
......@@ -76,7 +81,7 @@ class VelocityCommander(Node):
sp.x = math.nan
sp.y = math.nan
sp.z = -1.5
sp.z = -3.
sp.yaw = math.nan # should not yaw right at startup
......
......@@ -31,9 +31,9 @@ class VelocityController(Node):
# static transformation from pixhawk to camera frame
self.TF_PIX_TO_CAMERA = Transform(
translation = Vector3(z=.1), # Translation from Pixhawk to Camera
rotation = Quaternion() # Rotation from Pixhawk to Camera
rotation = quat_multiply(Quaternion(x=1.,z=0.), Quaternion(w=.7,z=.7)) # Rotation from Pixhawk to Camera
)
self.gains = {"P": 1., "I": .1} # Initial controller gains
self.gains = {"P": 0.1, "I": 0.} # Initial controller gains
self.dt = .01 # Frequency of controller execution
# class variables
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment