clean up a bit, start some documentation
This commit is contained in:
parent
e3fc02ebb6
commit
05cc87b2e9
3 changed files with 17 additions and 1 deletions
10
README.md
Normal file
10
README.md
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
This contains two packages:
|
||||||
|
- `simple_timer` contains timing related functions, and a wrapper for calling some kernel scheduling functions
|
||||||
|
- `priority_executor` contains the modified executor and some nodes to test it
|
||||||
|
|
||||||
|
In `priority_executor`:
|
||||||
|
- `priority_executor.cpp` subclasses `rclcpp::Executor` to allow for additional customization
|
||||||
|
- `priority_memory_strategy.hpp` is a modified version of `rclcpp`s `allocator_memory_strategy.hpp` that selects callbacks based on either the earliest deadline, or a relative priority. Executor polls this for ready callbacks.
|
||||||
|
- `test_nodes.cpp` adds timer-based publishing nodes and dummy worker nodes that can be arranged in chains. It uses `dummy_workload.hpp` to generate a workload.
|
||||||
|
- `f1tenth_test.cpp` sets up a chain of nodes similar to [https://intra.ece.ucr.edu/~hyoseung/pdf/rtas21_picas.pdf](https://intra.ece.ucr.edu/~hyoseung/pdf/rtas21_picas.pdf)
|
||||||
|
|
|
@ -266,7 +266,8 @@ int main(int argc, char **argv)
|
||||||
rclcpp::shutdown();
|
rclcpp::shutdown();
|
||||||
|
|
||||||
std::ofstream output_file;
|
std::ofstream output_file;
|
||||||
std::string suffix = "_rtis_alloc";
|
// useful if testing different variations
|
||||||
|
std::string suffix = "";
|
||||||
if (schedule_type == DEADLINE)
|
if (schedule_type == DEADLINE)
|
||||||
{
|
{
|
||||||
output_file.open("experiments/results/f1tenth_full" + std::to_string(NUM_EXECUTORS) + "c" + suffix + ".txt");
|
output_file.open("experiments/results/f1tenth_full" + std::to_string(NUM_EXECUTORS) + "c" + suffix + ".txt");
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include "priority_executor/primes_workload.hpp"
|
#include "priority_executor/primes_workload.hpp"
|
||||||
|
#include <iostream>
|
||||||
ktimeunit nth_prime_silly(int n, double millis)
|
ktimeunit nth_prime_silly(int n, double millis)
|
||||||
{
|
{
|
||||||
// struct tms this_thread_times;
|
// struct tms this_thread_times;
|
||||||
|
@ -23,6 +24,10 @@ ktimeunit nth_prime_silly(int n, double millis)
|
||||||
{
|
{
|
||||||
sum += j;
|
sum += j;
|
||||||
}
|
}
|
||||||
|
if (cum_time - start_cpu_time > millis)
|
||||||
|
{
|
||||||
|
std::cout << "Warning: Time limit exceeded" << std::endl;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return get_thread_time(&currTime) - start_cpu_time;
|
return get_thread_time(&currTime) - start_cpu_time;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue