Comments (8)
LOAM switches the axes for each scan before processing the scan. I assume the reason this is done has something to do with the standard coordinate frame from of the velodyne which I believe is z-forward. The x-forward convention is a ROS convention and I believe the ROS driver converts to the scans to the proper ROS convention. I imagine LOAM was written for the velodyne convention, not the ROS convention.
To fix this, change the lines 182-184 to:
point.x = laserCloudIn[i].x;
point.y = laserCloudIn[i].y;
point.z = laserCloudIn[i].z;
link:
Then, since they make an assumption on which axes correspond to the horizontal and vertical axes, you also need to change the following lines:
to:
float angle = std::atan(point.z / std::sqrt(point.y * point.y + point.x * point.x));
and
to
float ori = -std::atan2(point.y, point.x);
That should fix it! Hope this helps.
from loam_velodyne.
You can change Rviz Grid setting to 'XZ'.
from loam_velodyne.
I would have the exact same question as @ashnarayan13!
from loam_velodyne.
@RozDavid , I just had a static transform to handle this. But this doesn't solve the issue of the odometry being in a different frame.
@Zhehua-Hu , I want to change the odometry in the LOAM output
from loam_velodyne.
@ashnarayan13 have you resolved this problem? i'd like to know as i got this problem too
from loam_velodyne.
Hi @ashnarayan13 @w4rlock999 , I succeeded to resolve the convention issue, for changing the odometry frame a few months ago, just forgot to share it with you guys... Really sorry for that. So after including a static broadcaster in the launch file, something like this:
<node pkg="tf2_ros" type="static_transform_publisher" name="loam_broadcaster" args="0 0 0 0.5 0.5 0.5 0.5 world imu_new"/>
You still need the change the frames rotation quaternion with simply changing the axises. Either the imu or aft_mapped, both works similarly, it depends only on your purpose.
You can check my solution here:
https://github.com/RozDavid/loam-segmatch/blob/d1af9f5116e8c6fc5040d6f2f06868e905dcd7f2/src/lib/LaserOdometry.cpp#L908
In this case I included an extra frame for the static transform, then an extra static at the end, but neither of them are essential, only was important for me.
from loam_velodyne.
@RozDavid so, what is the purpose of the static broadcaster you make in the launch file? I dont understand?
And also my laserodometry.cpp already use the orientation you use like this:
laserOdometryTrans.setRotation(tf::Quaternion(-geoQuat.y, -geoQuat.z, geoQuat.x, geoQuat.w));
but it is still moving in the Z directions in the Rviz, the Odometry data (/laser_odom_to_init) also move in Z axis.
could you help me?
from loam_velodyne.
@nickcharron Thank you for the clarity.
from loam_velodyne.
Related Issues (20)
- Can someone tell me where I can download the testing bag nsh_indoor_outdoor.bag? HOT 2
- Transformation data for robot_localization
- How can this loam build a completed map? HOT 1
- Some questions about system performance HOT 4
- No Point Cloud Showed in Rviz HOT 5
- Error transforming odometry 'Odometry' from frame '/camera_init' to frame 'camera_init' HOT 14
- Segmentation Fault on "multiScanRegistration" node HOT 5
- Questions about the interpolation of laser point. HOT 3
- VLP16 rosbag not longer avaliable HOT 3
- compute the curvature HOT 4
- Question about relSweepTime and _imuPositionShift HOT 1
- Questions about BasicLaserOdometry HOT 1
- Why only for velodyne? How about point cloud from realsense?
- memory buildup with outdoor lidar scan
- VLP-16 rosbag example link is broken
- VLP-16 rosbag example link is broken
- Build error: flann error? HOT 1
- Compatibility on ROS Noetic (Ubuntu 20.04)
- Hey @MontyTHall. Seems thatβs a problem with recent version of RViz. Just change the camera_init frame on rviz from /camera_init to //camera_init. That solved my problem.
- proscess has died
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 loam_velodyne.