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

Feature/external event #9

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

rikba
Copy link
Contributor

@rikba rikba commented Jan 22, 2020

Add the possibility to add an external interrupt as a "sensor" input. ExternalEvent stamps the signal and publishes std_msgs::Time.

Requires: #8

Tested:
image

Copy link
Contributor

@floriantschopp floriantschopp left a comment

Choose a reason for hiding this comment

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

Very nice addition! We could also use this to hardware sync with a 3D lidar right?

}

void ExternalEvent::setupPublisher() {
// TODO(rikba): I don't know why this needs to be redeclared here. It was
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm also not fully sure but has sth to do when the node handle actually gets initialized.

@@ -160,6 +171,10 @@ void setup() {
FALLING);
attachInterrupt(digitalPinToInterrupt(cam2.exposurePin()), exposureEnd2,
FALLING);
#ifdef EXT_EVENT
attachInterrupt(ext_event0.eventPin(), extEvent0, EXT_EVENT_LOGIC);
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need

Suggested change
attachInterrupt(ext_event0.eventPin(), extEvent0, EXT_EVENT_LOGIC);
attachInterrupt(digitalPinToInterrupt(ext_event0.eventPin()), extEvent0, EXT_EVENT_LOGIC);

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

Successfully merging this pull request may close these issues.

2 participants