Comments (2)
When using a "global" map, you first need to convert it to a local frame, by applying the inverse of the global lidar pose, and then apply the augmentation (if needed).
from cmrnet.
Ok. Thank you. Actually I wanted have the global estimated pose directly. I think this code is working.
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 = 0.0 #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 = R.to_matrix()
R.resize_4x4()
T = mathutils.Matrix.Translation(T)
RT = T * R
pose_error_transform = torch.tensor(RT)
pose_estimated_lidar = torch.mm(poses[i],pose_error_transform)
print("::",poses[i],"\n",pose_error_transform,"\n",pose_estimated_lidar)
pose_estimated_lidar = pose_estimated_lidar.to(device)
After getting the estimated global lidar pose I use that pose to compute the local lidar map like you said
local_map = torch.mm(pose_estimated_lidar.inverse(), voxelized).t()
indexes = local_map[:, 1] > -25.
indexes = indexes & (local_map[:, 1] < 25.)
indexes = indexes & (local_map[:, 0] > -10.)
indexes = indexes & (local_map[:, 0] < 100.)
local_map = local_map[indexes]
local_map = torch.mm(velo2cam2, local_map.t())
local_map = local_map[[2, 0, 1, 3], :]
I think my mistake was in this line. I had reversed the matrix multiplication
pose_estimated_lidar = torch.mm(poses[i],pose_error_transform)
from cmrnet.
Related Issues (20)
- How can i run this project on RTX3090? HOT 13
- Problem with LocalMaps Generation HOT 20
- Training fails after Epoch 0 HOT 6
- Training fails after epoch 0 HOT 2
- Problem with evaluation script HOT 10
- About model performance HOT 3
- Using a different data set for training and evaluation HOT 12
- RuntimeError: CUDA error: no kernel image is available for execution HOT 1
- Some hints needed on converting to online use HOT 10
- Line of code seems incorrect HOT 1
- Some operations seem difficult to follow HOT 3
- Is there any specifc format for the KITTI extrinsics ?
- Ground truth test pose is required HOT 1
- Occlusion filtering (train vs eval show) HOT 2
- ValueError: mathutils.Euler(): invalid euler order 'XYZ' HOT 2
- When i run kitti_maps.py, it displays "killed". HOT 3
- Does CMRNet++ plan to open source? HOT 1
- kitti_map.py axis order issue HOT 7
- Evaluated Error Result issue
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cmrnet.