-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add tutorial to run the pendulum_control demo #21
Comments
@LanderU This a draft for the tmux script: Terminal 1: # Runs the demo in CPU 1 using for 10 minutes using RT settings
taskset -c 1 /opt/ros/rolling/bin/pendulum_demo -m 400mb -d 400mb -t 90 -s rr -u 1ms -i 60000 -f output.txt Terminal 2: # Runs the pendulum logger
pendulum_logger
# Runs the pendulum teleop in a loop, we just send the same position (0)
while true; do
pendulum_teleop 0
sleep 3m
done Terminal 4: htop Terminal 5 or in background in another terminal? # stress the system
taskset -c 0 stress -c 1 &
taskset -c 1 stress -c 1 &
taskset -c 2 stress -c 1 &
taskset -c 3 stress -c 1 &
taskset -c 0 stress -i 1 &
taskset -c 1 stress -i 1 &
taskset -c 2 stress -i 1 &
taskset -c 3 stress -i 1 & I removed the teleoperation cause is not real-time safe, it prints to the stdout and impacts the measurements. I think the demo was not intended to use it. This not documented anywhere I think. https://github.com/ros2/demos/blob/master/pendulum_control/include/pendulum_control/pendulum_controller.hpp#L103 |
The instructions and results with the RPI4 are hosted here https://github.com/ros-realtime/ros2_realtime_benchmarks/tree/main/pendulum_demo_benchmarks/experiments/galactic I'm trying to keep the instructions simple so I'm not including any stress, teleop, logging or CPU isolation. The first latency sample it's always much higher. See https://github.com/ros-realtime/ros2_realtime_benchmarks/blob/main/pendulum_demo_benchmarks/experiments/galactic/rpi4_rt/pendulum_demo_results_plot_latency.svg. It's not clear why this happens cause there are no page faults. This might be caused by another issue during initialization. We should find out what is causing this and either fix the problem or discard the first sample when logging. |
This is a list of issues I found when testing the pendulum demo:
Points 2 and 3 could be solved using callback groups. |
Edit: Consider re-writing the demo with the following changes:
|
No tutorial will be created for the pendulum_control. Only a brief document with some instructions to run the demo and create some plots here https://ros-realtime.github.io/Benchmarks/pendulum_demo_benchmark_instructions.html A follow-up issue has been created to improve the current demo: #37 |
There is one real-time related demo in ros2/demos repository: pendulum_control
This demo was presented in:
Real-time Performance in ROS 2
A tutorial already exists in: https://docs.ros.org/en/galactic/Tutorials/Real-Time-Programming.html
As part of this issue we should revisit the existing tutorial, reproduce the results and see if it needs to be updated, deprecated or just complemented with a new tutorial.
Acceptance Criteria
The text was updated successfully, but these errors were encountered: