Comments (3)
Yes, the fix is simple enough so I'll go ahead with a PR. It will probably be sometime next week.
from common_interfaces.
So I originally thought this was just a relatively harmless swapping of axes, but now I'm seeing it's creating issues with the point order in organized clouds. Specifically, I'm trying to read point clouds with the following structure:
PointCloud2:
height: 1544
width: 2064
fields:
sensor_msgs.msg.PointField(name='x', offset=0, datatype=7, count=1)
sensor_msgs.msg.PointField(name='y', offset=4, datatype=7, count=1)
sensor_msgs.msg.PointField(name='z', offset=8, datatype=7, count=1)
sensor_msgs.msg.PointField(name='normal_x', offset=16, datatype=7, count=1)
sensor_msgs.msg.PointField(name='normal_y', offset=20, datatype=7, count=1)
sensor_msgs.msg.PointField(name='normal_z', offset=24, datatype=7, count=1)
sensor_msgs.msg.PointField(name='curvature', offset=32, datatype=7, count=1)
is_bigend: False
is_dense: True
point_step: 48
row_step: 99072
num_bytes: 152967168
When I call read_points
, I get an array of shape (2064,1544) as expected. However, when I try to index the points in a 2D region, I find they are out of order. Switch the argument order in the call to reshape
inside read_points
fixes this and lets me access a contiguous region of the organized cloud.
from common_interfaces.
I agree that it seems transposed. Would you be able to open a PR with the fix and maybe a unit test so that we can prevent regression in the future?
from common_interfaces.
Related Issues (20)
- status field in NavSatStatus message has bad default value HOT 1
- [sensor_msgs_py] Missing handling of point_step value in PointCloud2 message in read_points() fcn HOT 2
- visualization_msgs/msg/Marker missing text in TEXT_VIEW_FACING HOT 3
- Why is there no safety scanner standard msg? HOT 2
- use FourCC codes for image encodings HOT 2
- Non-ASCII character causes an issue when parsing BatteryState.msg with 3rd party tools HOT 2
- Full path to the type used instead of the relative in the same package. Inertia.msg HOT 2
- Please add unlisted data types to the PointField message so they can be seen in the PointCloud2 data struct
- Release for Humble HOT 2
- Modern CMake Targets HOT 4
- Proposal - support velocity and velocity covariance in NavSatFix
- An element falsely commented out in the api doc? (shape_msgs/SolidPrimitive.msg)
- Feature: Add common set services for simple types HOT 1
- Image Projection Model HOT 2
- unable to build std_srvs HOT 1
- Extend or clarify TwistStamped semantics to be able to transform HOT 4
- Adding unique identifer field to Polygon/Polygon Stamped HOT 4
- colcon build error HOT 1
- Add copyright notice to LICENSE files HOT 2
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 common_interfaces.