Comments (7)
Got the same issue here...
Never used rotating lidar, so I can't really help...
from webots.
I couldn't reproduce this on the master branch by manually compiling the project. Using the nightly build versions 2023b-rev1 seems to work fine, but version 2024a does appear to produce points rotated by 180 degrees.
Looking at the diff between master and develop, it appears there are some updates introduced on develop:
--- a/src/webots/nodes/WbLidar.cpp
+++ b/src/webots/nodes/WbLidar.cpp
@@ -362,7 +362,8 @@ void WbLidar::copyAllLayersToMemoryMappedFile() {
maxWidth = ((double)w / 2.0) * (1.0 + ratio);
double tmpAngle =
- (fabs(mPreviousRotatingAngle / (2.0 * M_PI)) - floor(fabs(mPreviousRotatingAngle / (2.0 * M_PI)))) * (2.0 * M_PI);
+ (fabs((mPreviousRotatingAngle - M_PI) / (2.0 * M_PI)) - floor(fabs((mPreviousRotatingAngle - M_PI) / (2.0 * M_PI)))) *
+ (2.0 * M_PI);
if (tmpAngle < 0)
tmpAngle += 2.0 * M_PI;
widthOffset = resolution * (tmpAngle / (2.0 * M_PI));
@@ -383,7 +384,7 @@ void WbLidar::copyAllLayersToMemoryMappedFile() {
memcpy(data + (i + 1) * resolution + minWidth + widthOffset, mTemporaryImage + width() * (int)(i * skip) + minWidth,
sizeof(float) * abs(minWidth + widthOffset));
memcpy(data + i * resolution, mTemporaryImage + width() * (int)(i * skip) - widthOffset,
- sizeof(float) * (maxWidth + widthOffset));
+ sizeof(float) * abs(maxWidth + widthOffset));
}
}
}
These changes have been introduced by #6324. There must have been a conflict between the changes I made in #6417 and those of #6324. There is a missing - M_PI when theta0 is computed for rotating lidars.
Note: The "tilt angle" can also produce point clouds slightly rotated. #37
from webots.
Hello,
Take a look at #6417
Try to build webots from source on master, or get a nightly, until the new fixed version is out.
from webots.
@ShuffleWire Thanks for quick reply!
from webots.
@ShuffleWire When using the nightly build even tho that error is fixed I noticed now something weird going on when using rotational type.
Equal configuration than before + rotational type
It is like the pointcloud is rotated 180 deegres.
It even happens with the default lidar example.
from webots.
That should be it ! Could you make a quick PR to fix that ?
from webots.
Closing because PR is merged
from webots.
Related Issues (20)
- Possible mesh path bug when converting proto to nodes HOT 1
- Webots crash on save HOT 17
- Error: only one Robot instance can be created per controller process.
- Blank Space On Rendering Area HOT 3
- Webots shows an error message if MSYS2 is installed HOT 1
- URDF creation uses current joint values as new zero
- URDF export does place things correctly
- HELP ME!! Camera internal parameter calculation
- Language support - JuliaLang
- A parallelization problem: We are working on a project to train robots in webots through reinforcement learning
- Accelerometer not reproducible
- ROS sensor messages from the same update have slightly different timestamps HOT 1
- Reinforcement learning, highway_overtake will be disconnected directly after SimulationReset HOT 1
- 3D window offset HOT 7
- [SOLVED] When i open empty.wbt it did not open blockly when i have it insalled. HOT 5
- ERROR: Error downloading EXTERNPROTO 'Oak': Cannot download 'https://raw.githubusercontent.com/cyberbotics/webots/R2023b/projects/objects/trees/protos/Oak.proto', error code: 3: Host raw.githubusercontent.com not found HOT 2
- webots crash HOT 1
- ImportError: cannot import name 'Robot' from 'controller' HOT 1
- Difficulty in calculating the correct position in the webots environment
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 webots.