Compare commits
2 Commits
aecfd6e0c3
...
1a7f193a7f
Author | SHA1 | Date |
---|---|---|
scorpio1 | 1a7f193a7f | |
scorpio1 | 0a473195ff |
|
@ -56,7 +56,7 @@ def get_forward_acceleration(y, velocity):
|
|||
#is less (or if we are close to the finish)
|
||||
forward_velocity=np.dot(velocity,unit_vector)
|
||||
forward_acceleration = 2*(9.5-forward_velocity)
|
||||
forward_acceleration_2 = -1*(b2*forward_velocity+k2*(y-300))/m
|
||||
forward_acceleration_2 = -1*(b2*forward_velocity+k2*(y-100))/m
|
||||
return min(forward_acceleration, forward_acceleration_2)*unit_vector
|
||||
|
||||
def guidance_law():
|
||||
|
@ -77,7 +77,7 @@ def guidance_law():
|
|||
#we add 2 to the vertical acceleration because otherwise it sometimes
|
||||
#just falls
|
||||
accelerations.vector.z=accel[2]+2
|
||||
return to_publish
|
||||
return accelerations
|
||||
|
||||
|
||||
def accel_publisher():
|
||||
|
|
|
@ -4,7 +4,7 @@ from turtlesim.srv import *
|
|||
from geometry_msgs.msg import PoseStamped
|
||||
|
||||
def callback(data):
|
||||
teleport_turtle(data.pose.position.x/2+6,data.pose.position.y/2+6,0)
|
||||
teleport_turtle(data.pose.position.x/100+6,data.pose.position.y/100+6,0)
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue