From cc141099b747bec65536b2cce6115e0d9cb8d1cc Mon Sep 17 00:00:00 2001 From: Minyoung Kim Date: Thu, 12 Sep 2024 12:31:02 -0700 Subject: [PATCH] ros cmake install --- examples/house_thermo/src/house.cpp | 3 ++- examples/house_thermo/src/thermometer.cpp | 2 ++ examples/house_thermo/src/thermostat.cpp | 3 ++- radler/radlr/ros/roscmake.py | 4 +--- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/examples/house_thermo/src/house.cpp b/examples/house_thermo/src/house.cpp index bf60925..16a18f6 100644 --- a/examples/house_thermo/src/house.cpp +++ b/examples/house_thermo/src/house.cpp @@ -1,5 +1,5 @@ #include "house.h" - +#include House::House() { this->leak_rate = 0.1; @@ -12,6 +12,7 @@ void House::step(const radl_in_t * in, const radl_in_flags_t* iflags, this->temp += this->interval*(in->heater_rate->rate - this->leak_rate); out->house_temp->temp = this->temp; oflags->house_temp = 0; + std::cout << "Temperature : " << out->house_temp->temp << " Heater Rate : " << in->heater_rate->rate << std::endl; } diff --git a/examples/house_thermo/src/thermometer.cpp b/examples/house_thermo/src/thermometer.cpp index 1bfad21..1c63dc7 100644 --- a/examples/house_thermo/src/thermometer.cpp +++ b/examples/house_thermo/src/thermometer.cpp @@ -1,11 +1,13 @@ #include "thermometer.h" #include +#include void Thermometer::step(const radl_in_t * in, const radl_in_flags_t* inflags, radl_out_t * out, radl_out_flags_t* outflags){ float noise = (float)(rand()%20000 - 10000)/10000; out->thermometer_temp->temp = in->house_temp->temp + noise; + std::cout << "Temperature : " << out->thermometer_temp->temp << " Noise : " << noise << std::endl; } diff --git a/examples/house_thermo/src/thermostat.cpp b/examples/house_thermo/src/thermostat.cpp index e8f07fc..489c75a 100644 --- a/examples/house_thermo/src/thermostat.cpp +++ b/examples/house_thermo/src/thermostat.cpp @@ -1,5 +1,5 @@ - #include "thermostat.h" +#include Thermostat::Thermostat() { this->set_temp = 75.0; @@ -23,5 +23,6 @@ void Thermostat::step(const radl_in_t * in, const radl_in_flags_t* inflags, } else { out->heater_switch->switch_on = this->status; } + std::cout << "Switch : " << out->heater_switch->switch_on << std::endl; } diff --git a/radler/radlr/ros/roscmake.py b/radler/radlr/ros/roscmake.py index bea453b..18b0051 100644 --- a/radler/radlr/ros/roscmake.py +++ b/radler/radlr/ros/roscmake.py @@ -88,9 +88,7 @@ def clear(d, templates): install(TARGETS {to_install} - ARCHIVE DESTINATION lib - LIBRARY DESTINATION lib - RUNTIME DESTINATION bin + DESTINATION lib/{module} ) install(FILES