Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cut at specific angle feature #35

Conversation

ddillenberger
Copy link
Contributor

Hello,

this pull request should fix #33. I tested it sucessfully with a HDL 32E. We also used this code with an HDL 64E S2. The block-format never changed since 2008 I think.
A new parameter "cut_angle" is introduced, where one can set the desired "cut angle" in degree in device coordinates.

Standard behaviour is unchanged, so no code should be broken by this fix.

Denis

@lemiant
Copy link
Contributor

lemiant commented Aug 12, 2015

I've been using this PR in our project for a while. There is a bug where the timestamp is sometimes pulled from the wrong packet. Under this PR it still pulls the timestamp from
scan->packets[config_.npackets - 1].stamp even though the number of packets is no longer always npackets. This means that if the are more than npackets the timestamp is no longer from the last packet, which was the goal. Worse, when the numberof packets is less than npackets the timestamp is pulled from uninitialized memory off the end of the vector, which could be anything.
I've patched it for myself already, but I thought you might like to know.

@jack-oquin
Copy link
Member

Thanks for the report @lemiant.

I have merged this PR into a separate cut_at_specified_angle_feature branch. I would appreciate it if you would submit a new pull request against that for your fixes to it.


static int last_base_rotation = -1;
// Extract base rotation of first block in packet
std::size_t rot_data_pos = 100*0+2;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesn't this always equal to 2? why have 100*0?

{
while(true)
{
int rc = input_->getPacket(&tmp_packet);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The API has changed here. getPacket now expects two arguments.

virtual int getPacket(velodyne_msgs::VelodynePacket *pkt,
const double time_offset);

Copy link
Contributor

@volkandre volkandre Sep 28, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This only leads to an error, if you try to merge the "cut at specific angle" feature into the latest master branch. Please see #126 for an updated version of this feature.

@JWhitleyWork
Copy link
Contributor

Stale PR. Updated with #126.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Number of packets published per message is not exactly a revolution if "npackets" set to default
6 participants