Compare commits

...

2 Commits

Author SHA1 Message Date
scorpio1 1a7f193a7f allowed turtle to follow larger area 2022-07-22 15:21:07 -04:00
scorpio1 0a473195ff fixed typo 2022-07-22 15:20:13 -04:00
2 changed files with 3 additions and 3 deletions

View File

@ -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():

View File

@ -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)