-
Notifications
You must be signed in to change notification settings - Fork 351
Minimal implementation of realtime control demo #7
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
Conversation
pendulum_control/CMakeLists.txt
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not listed in the manifest.
cb4805e to
bf9bc92
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use CLOCK_MONOTONIC instead, so physics aren't affected by system time changes (NTP slew, user calling date --set=Fri May 4 13:38:56 CEST 1979).
For relative-time, high-precision computations like sleeping, the monotonic source is to be preferred. CLOCK_REALTIME is best left for synchronizing events on an absolute time reference, like start pendulum stabilization tomorrow at 3pm.
195dc63 to
fa0f41b
Compare
|
To enable CI for this demo, we need to add the dependency rttest to ros2.repos and clean up rttest for Jenkins: ros2/examples/pull/49 edit: done |
|
I changed the CMakeLists to avoid building this package on OSX and Windows and started CI: http://ci.ros2.org/job/ros2_batch_ci_linux/251/ We should expect Linux to build the package cleanly and OSX and Windows to avoid building it (though they will install a dummy "pendulum_control" package, since I don't know how to tell ament to avoid installing the package). |
|
If you don't call |
|
ah, I understand my issue now... If I returned from the package without calling William suggested I add ament_package as a workaround, but it I just find |
|
If not having any install steps is a viable use case we could make |
|
well, looks like calling http://ci.ros2.org/job/ros2_batch_ci_osx/180/ Is there a recommended way to conditionally skip the installation of a package? |
|
If a package does not use |
|
I agree that the build tool should not fail if a package has no install target, but calling |
|
@wjwwood The failed build happened after I took out the ament_package workaround, I thought simply calling I think it is viable to allow for conditionally not installing a package, unless we want to discourage people from making code that only compiles on one OS. The situation here is that |
d01d949 to
66db3f7
Compare
|
Overall this looks good to me. +1 pending the CI issues resolution. |
pendulum_control/CMakeLists.txt
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you move the find_package() call below the platform check it will exit a bit fast on non Linux system.
|
+1 (beside nit picking). |
b595613 to
abf107f
Compare
Minimal implementation of realtime control demo
This pull request adds:
pendulum_controlpackagependulum_msgspackage for custom message types. (Originally I considered usingsensor_msgs::JointState, but since it contains a string field, it is not a fixed size message.)RttExecutor: an executor instrumented for collecting data for real-time performance statisticsPendulumController: Store PID properties, provide the next command message based on the received sensor message.PendulumMotor: Abstraction for the physical state of the pendulum system. Change the state based on the command message and provide the next sensor message. Runs a separate "physics update" thread to update the state of the pendulum.The
README.mdfile contains more information about how to configure your system to see "soft" real-time performance results.