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

fix rtt_now when sim clock is running on xenomai #41

Closed
wants to merge 1 commit into from
Closed

fix rtt_now when sim clock is running on xenomai #41

wants to merge 1 commit into from

Conversation

ahoarau
Copy link
Contributor

@ahoarau ahoarau commented Jun 1, 2015

Discussed here :
jhu-lcsr/rtt_gazebo#21

@@ -55,13 +55,17 @@ const ros::Time rtt_rosclock::rtt_now()
const uint64_t one_E9 = 1000000000ULL;
// NOTE: getNSecs returns wall time, getTicks returns offset time
#ifdef __XENO__
Copy link
Member

Choose a reason for hiding this comment

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

Why is this distinction between Xenomai and non-Xenomai builds required here at all, independent of sim time?
Wouldn't getTicks() (the else branch) work for both cases?

getTicks() => rt_timer_tsc() (if system clock is enabled in the TimeService)
getNSecs() => rt_timer_ticks2ns(rt_timer_read()) (independent of sim/system time mode)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll look into that next week. Thanks for the clarification !

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's very true, I'm closing this PR until I provide a new one with your recommendations :)

@ahoarau ahoarau closed this Apr 14, 2016
@ahoarau ahoarau reopened this Jul 8, 2016
@ahoarau ahoarau closed this Jul 8, 2016
@ahoarau
Copy link
Contributor Author

ahoarau commented Jul 8, 2016

fixed PR with #65

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.

None yet

2 participants