Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turning rate seems too little #7

Open
bartboogmans opened this issue Mar 1, 2023 · 2 comments
Open

Turning rate seems too little #7

bartboogmans opened this issue Mar 1, 2023 · 2 comments

Comments

@bartboogmans
Copy link
Owner

During a waypoint following test in a circle it was found that the controller that works on the real ship does not yield enough turning rate on the nausbot TitoNeri model.

The below video shows the titon neri waypointfollowing matlab gui and matlab heading pid controller in the loop.
Notice that the angles of the thrusters are at about ~rad ~60degrees but the ship is not turning fast at all, while the real ship would have almost turned at the spot at those angles.
Screencast from 01-03-23 11:51:33.webm

@mvgijn ,As discussed through email, this thread to figure out the discrepancy between sim and real ship.

@bartboogmans
Copy link
Owner Author

Adjusted the sim to stream also internal forces on ros. A single test imposing actuator vector [1800,0,0,pi/2,0] yielded the following result on ros.
image

image

using the implemented thruster relation yields correct result when these calculations are followed by hand with an input of v = 1800/60 = 30rps an a distance from thruster to CO of 0.42m

		self.thrustToForce = [lambda v: ((1.925e-5)*v*v*v+(1.061e-2)*v), # output: Newton, Input: RPS
							lambda v: ((1.925e-5)*v*v*v+(1.061e-2)*v), # output: Newton, Input: RPS
							lambda PWM_value: PWM_value*3.575] # output: Newton, Input is normalized pwm [-1:1]

@bartboogmans
Copy link
Owner Author

bartboogmans commented Mar 29, 2023

y forces: 1,925/100000*30*30*30 + 1,061/100*30 = 0.83805 Newton
torque z : (1,925/100000*30*30*30 + 1,061/100*30)*0,42 = 0.351981 Newton*meter

Comparing this to the measured values seems to make sense.
image

Will look at the physics of the rigid body now, as this sample scenario behaves as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant