Skip to content

Commit 5764897

Browse files
author
Erwan Le Huitouze
committed
Add heater ros msg & srv
0 parents  commit 5764897

15 files changed

+300
-0
lines changed

CMakeLists.txt

+145
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
cmake_minimum_required(VERSION 2.8.3)
2+
project(heater_msgs)
3+
4+
## Find catkin macros and libraries
5+
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
6+
## is used, also find other catkin packages
7+
find_package(catkin REQUIRED COMPONENTS message_generation std_msgs sensor_msgs)
8+
9+
## System dependencies are found with CMake's conventions
10+
# find_package(Boost REQUIRED COMPONENTS system)
11+
12+
13+
## Uncomment this if the package has a setup.py. This macro ensures
14+
## modules and global scripts declared therein get installed
15+
## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html
16+
#catkin_python_setup()
17+
18+
#######################################
19+
## Declare ROS messages and services ##
20+
#######################################
21+
22+
## Generate messages in the 'msg' folder
23+
add_message_files(
24+
DIRECTORY
25+
msg
26+
FILES
27+
HeatingTemperatureSlot.msg
28+
HeatingPilotAction.msg
29+
HeatingPilotStateData.msg
30+
HeatingStateData.msg
31+
LogHeatingStateData.msg
32+
SensorTemperatureStateData.msg
33+
)
34+
35+
## Generate services in the 'srv' folder
36+
add_service_files(
37+
DIRECTORY
38+
srv
39+
FILES
40+
HeatingAddTimeSlot.srv
41+
HeatingGetTimeSlots.srv
42+
HeatingRemoveTimeSlot.srv
43+
HeatingRemoveTimeSlots.srv
44+
HeatingUpdatePid.srv
45+
)
46+
47+
## Generate added messages and services with any dependencies listed here
48+
generate_messages(
49+
DEPENDENCIES
50+
std_msgs
51+
sensor_msgs
52+
)
53+
54+
###################################
55+
## catkin specific configuration ##
56+
###################################
57+
## The catkin_package macro generates cmake config files for your package
58+
## Declare things to be passed to dependent projects
59+
## INCLUDE_DIRS: uncomment this if you package contains header files
60+
## LIBRARIES: libraries you create in this project that dependent projects also need
61+
## CATKIN_DEPENDS: catkin_packages dependent projects also need
62+
## DEPENDS: system dependencies of this project that dependent projects also need
63+
catkin_package(
64+
# INCLUDE_DIRS include
65+
# LIBRARIES media_msgs
66+
CATKIN_DEPENDS message_runtime std_msgs sensor_msgs
67+
# roscpp rospy std_msgs
68+
# DEPENDS system_lib
69+
)
70+
71+
###########
72+
## Build ##
73+
###########
74+
75+
## Specify additional locations of header files
76+
## Your package locations should be listed before other locations
77+
# include_directories(include)
78+
include_directories(
79+
${catkin_INCLUDE_DIRS}
80+
)
81+
82+
## Declare a cpp library
83+
# add_library(media_msgs
84+
# src/${PROJECT_NAME}/media_msgs.cpp
85+
# )
86+
87+
## Declare a cpp executable
88+
# add_executable(media_msgs_node src/media_msgs_node.cpp)
89+
90+
## Add cmake target dependencies of the executable/library
91+
## as an example, message headers may need to be generated before nodes
92+
#add_dependencies(media_msgs_node media_msgs_generate_messages_cpp)
93+
94+
## Specify libraries to link a library or executable target against
95+
# target_link_libraries(media_msgs_node
96+
# ${catkin_LIBRARIES}
97+
# )
98+
99+
#############
100+
## Install ##
101+
#############
102+
103+
# all install targets should use catkin DESTINATION variables
104+
# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html
105+
106+
## Mark executable scripts (Python etc.) for installation
107+
## in contrast to setup.py, you can choose the destination
108+
#install(PROGRAMS
109+
# scripts/my_python_script
110+
# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
111+
#)
112+
113+
## Mark executables and/or libraries for installation
114+
# install(TARGETS media_msgs media_msgs_node
115+
# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
116+
# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
117+
# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
118+
# )
119+
120+
## Mark cpp header files for installation
121+
# install(DIRECTORY include/${PROJECT_NAME}/
122+
# DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
123+
# FILES_MATCHING PATTERN "*.h"
124+
# PATTERN ".svn" EXCLUDE
125+
# )
126+
127+
## Mark other files for installation (e.g. launch and bag files, etc.)
128+
# install(FILES
129+
# # myfile1
130+
# # myfile2
131+
# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
132+
# )
133+
134+
#############
135+
## Testing ##
136+
#############
137+
138+
## Add gtest based cpp test target and link libraries
139+
# catkin_add_gtest(${PROJECT_NAME}-test test/test_media_msgs.cpp)
140+
# if(TARGET ${PROJECT_NAME}-test)
141+
# target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME})
142+
# endif()
143+
144+
## Add folders to be run by python nosetests
145+
# catkin_add_nosetests(test)

__init__.py

Whitespace-only changes.

msg/HeatingPilotAction.msg

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
## State data heating message
2+
## Common state of heating
3+
4+
Header header
5+
6+
# Pilot 0 : stop, 1 : comfort, 2 : comfort -1 C, 2 : comfort -2 C, 3 : eco, 4 : frost protection
7+
uint32 value
8+
9+
# Pilot values constants
10+
uint32 STOP=0
11+
uint32 START=1
12+
uint32 COMFORT1=2
13+
uint32 COMFORT2=3
14+
uint32 ECO=4
15+
uint32 FROSTPROTECTION=5

msg/HeatingPilotStateData.msg

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
## State data heating message
2+
## Common state of heating
3+
4+
Header header
5+
6+
# Pilot 0 : stop, 1 : comfort, 2 : comfort -1 C, 2 : comfort -2 C, 3 : eco, 4 : frost protection
7+
uint32 state
8+
9+
# Pilot constants
10+
uint32 STOP=0
11+
uint32 START=1
12+
uint32 COMFORT1=2
13+
uint32 COMFORT2=3
14+
uint32 ECO=4
15+
uint32 FROSTPROTECTION=5

msg/HeatingStateData.msg

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
## State data heating message
2+
## Common state of heating
3+
4+
Header header
5+
6+
# PID
7+
float64 proportional
8+
float64 integral
9+
float64 derivative
10+
11+
# Goal
12+
sensor_msgs/Temperature temperatureReal
13+
sensor_msgs/Temperature temperatureGoal
14+
HeatingTemperatureSlot timeSlotCurrent
15+
16+
# States
17+
bool heaterState
18+
bool sensorState

msg/HeatingTemperatureSlot.msg

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
## State data heating message
2+
## Common state of heating
3+
4+
Header header
5+
6+
string dateBegin # format: yy-MM-dd'T'HH:mm:ss
7+
string dateEnd # format: yy-MM-dd'T'HH:mm:ss
8+
sensor_msgs/Temperature temperature
9+
uint32 priority # a higher value has the priority
10+
float32 frequency # 0 = no frequency, use specific dateBegin, dateEnd
11+
string frequencyUnit

msg/LogHeatingStateData.msg

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
## State data temperature sensor message
2+
## Common state of temperature sensor
3+
4+
Header header
5+
6+
string date
7+
HeatingStateData statedata

msg/SensorTemperatureStateData.msg

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
## State data temperature sensor message
2+
## Common state of temperature sensor
3+
4+
Header header
5+
6+
# Temperatures
7+
sensor_msgs/Temperature temperatureAmbiant
8+
sensor_msgs/Temperature temperatureObject
9+
10+
# State 0: Unknown, 1: Init, 2: Enable, 3: Shutdown
11+
uint32 state
12+
13+
# State constants
14+
uint32 UNKNOWN=0
15+
uint32 INIT=1
16+
uint32 ENABLE=2
17+
uint32 SHUTDOWN=3

package.xml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?xml version="1.0"?>
2+
<package>
3+
<name>heater_msgs</name>
4+
<version>0.1.8</version>
5+
<description>This package is Home messages for Ros.</description>
6+
<maintainer email="[email protected]">Mickaël Gaillard</maintainer>
7+
<maintainer email="[email protected]">Erwan Le Huitouze</maintainer>
8+
<license>GPLv3</license>
9+
<url type="website">https://support.tactfactory.com/projects/medialfred/wiki/Wiki</url>
10+
<author email="[email protected]">Erwan Le Huitouze</author>
11+
12+
13+
<!-- The *_depend tags are used to specify dependencies -->
14+
<!-- Dependencies can be catkin packages or system dependencies -->
15+
<!-- Examples: -->
16+
<!-- Use build_depend for packages you need at compile time: -->
17+
<!-- <build_depend>message_generation</build_depend> -->
18+
<!-- Use buildtool_depend for build tool packages: -->
19+
<!-- <buildtool_depend>catkin</buildtool_depend> -->
20+
<!-- Use run_depend for packages you need at runtime: -->
21+
<!-- <run_depend>message_runtime</run_depend> -->
22+
<!-- Use test_depend for packages you need only for testing: -->
23+
<!-- <test_depend>gtest</test_depend> -->
24+
<buildtool_depend>catkin</buildtool_depend>
25+
26+
<build_depend>message_generation</build_depend>
27+
<build_depend>std_msgs</build_depend>
28+
<build_depend>sensor_msgs</build_depend>
29+
30+
<run_depend>message_runtime</run_depend>
31+
<run_depend>std_msgs</run_depend>
32+
<run_depend>sensor_msgs</run_depend>
33+
34+
35+
<!-- The export tag contains other, unspecified, tags -->
36+
<export>
37+
<!-- You can specify that this package is a metapackage here: -->
38+
<!-- <metapackage/> -->
39+
40+
<!-- Other tools can request additional information be placed here -->
41+
42+
</export>
43+
</package>

setup.py

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
## ! DO NOT MANUALLY INVOKE THIS setup.py, USE CATKIN INSTEAD
2+
3+
from distutils.core import setup
4+
from catkin_pkg.python_setup import generate_distutils_setup
5+
6+
# fetch values from package.xml
7+
setup_args = generate_distutils_setup(
8+
packages=['media_msgs'],
9+
package_dir={'': 'script'},
10+
requires=['std_msgs', 'rospy'])
11+
12+
setup(**setup_args)

srv/HeatingAddTimeSlot.srv

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
HeatingTemperatureSlot slot
2+
---
3+
bool result

srv/HeatingGetTimeSlots.srv

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
HeatingTemperatureSlot[] slots

srv/HeatingRemoveTimeSlot.srv

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
HeatingTemperatureSlot slot
2+
---
3+
bool result

srv/HeatingRemoveTimeSlots.srv

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
bool result

srv/HeatingUpdatePid.srv

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# PID
2+
float32 proportional
3+
float32 integral
4+
float32 derivative
5+
int32 priority
6+
---
7+
HeatingStateData statedata

0 commit comments

Comments
 (0)