Skip to content

Commit 2e71f76

Browse files
added some TODO messages
1 parent bc6ee35 commit 2e71f76

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

GEMstack/onboard/interface/gem_gazebo.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ def global_callback(self, msg):
444444
if msg.subsystem_can_timeout:
445445
self.faults.append("subsystem_can_timeout")
446446

447-
# Maybe need to change for controls? idk
447+
#TODO: Start gazebo
448448
def start(self):
449449
# assert self.thread is None
450450
# print("Running simulator thread...")
@@ -562,13 +562,10 @@ def callback_with_cv2(msg : Image):
562562
def send_command(self, command : GEMVehicleCommand):
563563

564564
rospy.loginfo(f"got command: {command}")
565-
t = self.time()
566-
if t < self.last_command_time + 1.0/self.max_send_rate:
567-
#skip command, PACMod can't handle commands this fast
568-
return
569-
self.last_command_time = t
570565

571566
def extract_vehicle_info( currentPose):
567+
568+
#TODO: replace with already proviced function and make sure convention is correct
572569
def quaternion_to_euler(x, y, z, w):
573570
t0 = +2.0 * (w * x + y * z)
574571
t1 = +1.0 - 2.0 * (x * x + y * y)
@@ -585,7 +582,13 @@ def quaternion_to_euler(x, y, z, w):
585582

586583
pos_x = currentPose.pose.position.x
587584
pos_y = currentPose.pose.position.y
585+
588586
vel = np.linalg.norm([currentPose.twist.linear.x, currentPose.twist.linear.y, currentPose.twist.linear.z])
587+
588+
#TODO: figure out velocity sign Is this correct
589+
590+
# if currentPose.twist.linear.x<0:
591+
# vel = -vel
589592
_,_, yaw = quaternion_to_euler(currentPose.pose.orientation.x, currentPose.pose.orientation.y, currentPose.pose.orientation.z, currentPose.pose.orientation.w)
590593

591594

@@ -608,8 +611,6 @@ def quaternion_to_euler(x, y, z, w):
608611
steering_angle_rate = front_wheel_angle_rate if phides > phi + phi_deadband else \
609612
(-front_wheel_angle_rate if phides < phi - phi_deadband else 0.0)
610613

611-
# if command.brake_pedal_position > 0.0:
612-
# acceleration = 0.0
613614

614615

615616

0 commit comments

Comments
 (0)