ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Only, I am using a float.
from custom_interfaces.msg import Age ... def on_shutdown(self): self.age.year = 2022
isn't 2022
an int
?
at least Python seems to think it is:
>>> type(2022)
<class 'int'>
To make it a float
:
>>> type(float(2022))
<class 'float'>