Functions for tank movement (differential steering)
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I'm programming a game, of sorts, where a tank is steered based on the thrust applied to each of its caterpillar-tracks.
I'm in need of two functions:
$R(T_l, T_r, d)$
which will return the angular velocity of the tank, in radians/s, and
$S(T_l, T_r, d)$
which will return the current speed which the tank should be travelling, in units/s, where $T_l$ = the thrust on the left wheel, $T_r$ = the thrust on the right wheel, and $d$ = the distance between the origin (middle) of the tank and any of the wheels.
As a diagram, it would look like this:
Notice that there are a few parts of the diagram which I haven't already mentioned ($[a,b]$, and $s$), which I will explain soon.
I have thought of a few pieces of a possible solution, however I'm not sure how effectively this will work:
- Let the vector $mathbf l mathrm = [-d, T_l]$, and $mathbf r mathrm = [d, T_r]$, so that they are the tips of the visual representations of the thrusts (in the diagram, the tips of the arrows $T_l$ and $T_r$).
- The angular velocity is the angle between the perpendicular of $overrightarrowlr$
and the origin of the tank. - The speed is the distance between the midpoint of $overrightarrowlr$ and the origin of the tank.
Is this correct? If so, how would I calculate the values? If not, what would be the correct way?
vectors simulation
add a comment |Â
up vote
0
down vote
favorite
I'm programming a game, of sorts, where a tank is steered based on the thrust applied to each of its caterpillar-tracks.
I'm in need of two functions:
$R(T_l, T_r, d)$
which will return the angular velocity of the tank, in radians/s, and
$S(T_l, T_r, d)$
which will return the current speed which the tank should be travelling, in units/s, where $T_l$ = the thrust on the left wheel, $T_r$ = the thrust on the right wheel, and $d$ = the distance between the origin (middle) of the tank and any of the wheels.
As a diagram, it would look like this:
Notice that there are a few parts of the diagram which I haven't already mentioned ($[a,b]$, and $s$), which I will explain soon.
I have thought of a few pieces of a possible solution, however I'm not sure how effectively this will work:
- Let the vector $mathbf l mathrm = [-d, T_l]$, and $mathbf r mathrm = [d, T_r]$, so that they are the tips of the visual representations of the thrusts (in the diagram, the tips of the arrows $T_l$ and $T_r$).
- The angular velocity is the angle between the perpendicular of $overrightarrowlr$
and the origin of the tank. - The speed is the distance between the midpoint of $overrightarrowlr$ and the origin of the tank.
Is this correct? If so, how would I calculate the values? If not, what would be the correct way?
vectors simulation
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm programming a game, of sorts, where a tank is steered based on the thrust applied to each of its caterpillar-tracks.
I'm in need of two functions:
$R(T_l, T_r, d)$
which will return the angular velocity of the tank, in radians/s, and
$S(T_l, T_r, d)$
which will return the current speed which the tank should be travelling, in units/s, where $T_l$ = the thrust on the left wheel, $T_r$ = the thrust on the right wheel, and $d$ = the distance between the origin (middle) of the tank and any of the wheels.
As a diagram, it would look like this:
Notice that there are a few parts of the diagram which I haven't already mentioned ($[a,b]$, and $s$), which I will explain soon.
I have thought of a few pieces of a possible solution, however I'm not sure how effectively this will work:
- Let the vector $mathbf l mathrm = [-d, T_l]$, and $mathbf r mathrm = [d, T_r]$, so that they are the tips of the visual representations of the thrusts (in the diagram, the tips of the arrows $T_l$ and $T_r$).
- The angular velocity is the angle between the perpendicular of $overrightarrowlr$
and the origin of the tank. - The speed is the distance between the midpoint of $overrightarrowlr$ and the origin of the tank.
Is this correct? If so, how would I calculate the values? If not, what would be the correct way?
vectors simulation
I'm programming a game, of sorts, where a tank is steered based on the thrust applied to each of its caterpillar-tracks.
I'm in need of two functions:
$R(T_l, T_r, d)$
which will return the angular velocity of the tank, in radians/s, and
$S(T_l, T_r, d)$
which will return the current speed which the tank should be travelling, in units/s, where $T_l$ = the thrust on the left wheel, $T_r$ = the thrust on the right wheel, and $d$ = the distance between the origin (middle) of the tank and any of the wheels.
As a diagram, it would look like this:
Notice that there are a few parts of the diagram which I haven't already mentioned ($[a,b]$, and $s$), which I will explain soon.
I have thought of a few pieces of a possible solution, however I'm not sure how effectively this will work:
- Let the vector $mathbf l mathrm = [-d, T_l]$, and $mathbf r mathrm = [d, T_r]$, so that they are the tips of the visual representations of the thrusts (in the diagram, the tips of the arrows $T_l$ and $T_r$).
- The angular velocity is the angle between the perpendicular of $overrightarrowlr$
and the origin of the tank. - The speed is the distance between the midpoint of $overrightarrowlr$ and the origin of the tank.
Is this correct? If so, how would I calculate the values? If not, what would be the correct way?
vectors simulation
asked Jul 14 at 17:03


Jacob Garby
104
104
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2851780%2ffunctions-for-tank-movement-differential-steering%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password