Skip to content

Commit

Permalink
ros cmake install
Browse files Browse the repository at this point in the history
  • Loading branch information
mkimsri committed Sep 12, 2024
1 parent 1e0479f commit cc14109
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion examples/house_thermo/src/house.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "house.h"

#include <iostream>

House::House() {
this->leak_rate = 0.1;
Expand All @@ -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;
}


2 changes: 2 additions & 0 deletions examples/house_thermo/src/thermometer.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#include "thermometer.h"

#include <stdlib.h>
#include <iostream>

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;
}


3 changes: 2 additions & 1 deletion examples/house_thermo/src/thermostat.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

#include "thermostat.h"
#include <iostream>

Thermostat::Thermostat() {
this->set_temp = 75.0;
Expand All @@ -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;
}

4 changes: 1 addition & 3 deletions radler/radlr/ros/roscmake.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cc14109

Please sign in to comment.