Created a private instance of the WindSensor class in the physics engine node.
Added a new private method: __update_wind_sensor(). This method updates the wind attribute of the WindSensor instance using the wind generator (self.__wind_generator).
Integrated __update_wind_sensor() call right before self.__update_boat_state() in the __publish() function.
Modified the self.__update_boat_state() method to use data from the WindSensor instead of the wind generator, introducing realistic noise into the simulation.
WindSensor
class in the physics engine node.__update_wind_sensor()
. This method updates thewind
attribute of theWindSensor
instance using the wind generator (self.__wind_generator
).__update_wind_sensor()
call right beforeself.__update_boat_state()
in the__publish()
function.self.__update_boat_state()
method to use data from theWindSensor
instead of the wind generator, introducing realistic noise into the simulation.