GithubHelp home page GithubHelp logo

Comments (3)

cattaneod avatar cattaneod commented on August 24, 2024

rotate_back and rotate_forward are basically the same, but with the RT inverted.

In RTs I save the results:
RTs[0] is the initial estimation H_init
RTs[1] is H_init @ prediction1 (prediction of the first network)
RTs[2] is H_init @ prediction1 @ prediction2

and so on. Thus, the final RTs[-1] should be as close as possible to the identity matrix.

from cmrnet.

RaviBeagle avatar RaviBeagle commented on August 24, 2024

Yes. Thank you.
I do understand that rotate_back is meant to rotate the point cloud from estimated to real pose.
and rotate_forward from actual pose to erroneous pose. And only invert of RT is the difference between the two functions.

DataSetVisibility*.py
R = mathutils.Euler((rotx, roty, rotz), 'XYZ')
T = mathutils.Vector((transl_x, transl_y, transl_z))

    R, T = invert_pose(R, T)   ##  Invert Error Transform as 
    R, T = torch.tensor(R), torch.tensor(T)

But in in evaluate_*.py:

R = mathutils.Quaternion(sample['rot_error'][idx])
T = mathutils.Vector(sample['tr_error'][idx])
print(pc_rotated.shape, R, T)
pc_rotated = rotate_back(pc_rotated, R, T)

Here should we not use rotate_forward ? Or have got the understanding interchanged ?

from cmrnet.

RaviBeagle avatar RaviBeagle commented on August 24, 2024

I will keep the same conventions. So this is my code for now:

        max_angle = 10.0
        max_t = 2.0
        rotz = np.random.uniform(-max_angle, max_angle) * (3.141592 / 180.0)
        roty = np.random.uniform(-max_angle, max_angle) * (3.141592 / 180.0)
        rotx = np.random.uniform(-max_angle, max_angle) * (3.141592 / 180.0)
        transl_x = np.random.uniform(-max_t, max_t)
        transl_y = np.random.uniform(-max_t, max_t)
        transl_z = np.random.uniform(-max_t, min(max_t, 1.))

        R = mathutils.Euler((rotx, roty, rotz), 'XYZ')
        T = mathutils.Vector((transl_x, transl_y, transl_z))
        R_inv, T_inv = invert_pose(R, T)

        R = quat2mat(torch.tensor(R_inv,device='cuda'))
        T = tvector2mat(torch.tensor(T_inv,device='cuda'))

        RT1_inv = torch.mm(T, R)
        RT1 = RT1_inv.clone().inverse()
        rotated_point_cloud = rotate_forward(local_map, RT1)
        
        project_lidar_to_image(cam_params,rotated_point_cloud,rgb_image,True,"INPUT")

from cmrnet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.