Jump to content

  • Log In with Google      Sign In   
  • Create Account

lucky6969b

Member Since 06 Apr 2007
Offline Last Active Private

Posts I've Made

In Topic: How to sample a 3D dubins path according to distance travelled?

17 September 2016 - 12:49 AM

What is the implication of dotting a vector and a matrix and resulting in another vector like this?

 

D3DXVECTOR3 dot(D3DXVECTOR3 t1, D3DXMATRIX t2)
{
    

    // x = ax + by + cz
    // y = px + qy + rz
    // z = ux + vy + wz

    double x = t1.x * t2._11 + t1.y * t2._12 + t1.z * t2._13;
    double y = t1.x * t2._21 + t1.y * t2._22 + t1.z * t2._23;
    double z = t1.x * t2._31 + t1.y * t2._32 + t1.z * t2._33;
    
    return D3DXVECTOR3(x, y, z);
}

 

When dotting a vector against another vector, I get a scalar, it tells me how the vectors are separating.

But I don't know the true meaning of dotting a vector against a matrix that results in another vector of sums

Thanks

Jack


In Topic: How to sample a 3D dubins path according to distance travelled?

16 September 2016 - 02:03 AM

I read up the comments of the code this morning.

I came to understand what it is doing

 

the ones that start with the letter 'q' is a directional vector

'w' is a positional vector

 

e.g.

// # end spiral
sol.c_e = cre - D3DXVECTOR3(0, 0, -dist2*tan(gam));
sol.psi_e = theta - PI / 2;
sol.lamda_e = 1;

//# hyperplane H_s : switch from first spiral to line
sol.w_s = w1;
sol.q_s = q1;

// # hyperplane H_l: switch from line to last spiral
sol.w_l = w2;
sol.q_l = q1;

// # hyperplane H_e: end of Dubins path
sol.w_e = ze;
sol.q_e = dot(D3DXVECTOR3(1, 0, 0), rotY(anglend));

It is a RSR turn.

Start with the w_s, which is an end point of a spiral

and q_s is which direction it is pointing towards.

 

So let's say I start with position (10, 20, 30) and some direction say a radian of 1.57

If a path is found and in the case of RSR turn, there will be a spiral

between (10, 20, 30) and w_s, and the directions are already said,

which is 1.57 from the starting point and ends with q_s

 

So the problem reduces to finding a sampled point within the spiral itself

The other segments are found exactly the same way.

 

Unfortunately, I am not good at mathematics, and I couldn't find much materials

on how to go about finding the value of the sampled point...

Thanks

Jack


In Topic: How to sample a 3D dubins path according to distance travelled?

15 September 2016 - 08:36 PM

Hello ferrous,

Thanks for answering my question....

Have you got any ideas what these cryptic names mean?

I just extract them from here

 

I just start thinking about it, I probably need to have at least a starting position and an ending position

so that I can do a D3DXVec3Lerp on it.

 

Just an educated guess, does it mean, like start, end and intermediate start and end?

What do all the w's, c's, k's, q's and l's do?

 

 

https://github.com/unr-arl/DubinsAirplane

struct DubinsPath3D
{

    D3DXVECTOR3 p_s;
    D3DXVECTOR3 p_e;
    float angl_s;
    float angl_e;

    int _case;
    float R;
    float gam;
    float L;

    int lamda_s;
    float k_s;
    float psi_s;
    D3DXVECTOR3 c_s;
    D3DXVECTOR3 w_s;
    D3DXVECTOR3 q_s;


    int lamda_si;
    float psi_si;
    float k_si;
    D3DXVECTOR3 c_si;
    D3DXVECTOR3 w_si;
    D3DXVECTOR3 q_si;
    
    int lamda_e;
    float k_e;
    float psi_e;
    D3DXVECTOR3 c_e;
    D3DXVECTOR3 w_e;
    D3DXVECTOR3 q_e;

    int lamda_ei;
    float k_ei;
    float psi_ei;
    D3DXVECTOR3 c_ei;
    D3DXVECTOR3 w_ei;    
    D3DXVECTOR3 q_ei;   
    
    D3DXVECTOR3 w_l;
    D3DXVECTOR3 q_l;
};

Thanks

Jack


In Topic: Mixing up a "bag" of components with different ownership scheme

09 September 2016 - 04:23 AM

Nup, I decided to add a dedicated interface for shared objects....

It is dirtier, but it fulfills my needs...

Thanks though

Jack


In Topic: Mixing up a "bag" of components with different ownership scheme

09 September 2016 - 04:10 AM

Sounds reasonable. Hope not getting any memory leaks when it is in production

It will test it out anyways


PARTNERS