30 const nav_msgs::OccupancyGrid& map,
31 const stdr_msgs::ThermalSensorMsg& msg,
32 const std::string& name,
34 :
Sensor(map, name, n, msg.pose, msg.frame_id, msg.frequency)
42 "stdr_server/thermal_sources_list",
65 stdr_msgs::ThermalSensorMeasurementMsg measuredSourcesMsg;
67 measuredSourcesMsg.header.frame_id =
_description.frame_id;
72 float min_angle = sensor_th -
_description.angleSpan / 2.0;
73 float max_angle = sensor_th +
_description.angleSpan / 2.0;
75 measuredSourcesMsg.thermal_source_degrees.push_back(0);
103 measuredSourcesMsg.thermal_source_degrees[0])
105 measuredSourcesMsg.thermal_source_degrees[0] =
119 const stdr_msgs::ThermalSourceVector& msg)
stdr_msgs::ThermalSensorMsg _description
< thermal sensor description
const std::string & _namespace
< The base for the sensor frame_id
void publish(const boost::shared_ptr< M > &message) const
ros::Subscriber thermal_sources_subscriber_
The currently existent sources.
Subscriber subscribe(const std::string &topic, uint32_t queue_size, void(T::*fp)(M), T *obj, const TransportHints &transport_hints=TransportHints())
The main namespace for STDR Robot.
static double getYaw(const Quaternion &bt_q)
A class that provides sensor abstraction.
stdr_msgs::ThermalSourceVector thermal_sources_
TFSIMD_FORCE_INLINE const tfScalar & x() const
ThermalSensor(const nav_msgs::OccupancyGrid &map, const stdr_msgs::ThermalSensorMsg &msg, const std::string &name, ros::NodeHandle &n)
Default constructor.
tf::StampedTransform _sensorTransform
True if sensor got the _sensorTransform.
virtual void updateSensorCallback()
Updates the sensor measurements.
TFSIMD_FORCE_INLINE const tfScalar & y() const
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
static bool angCheck(float target_, float min_, float max_)
Checks if an angle is between two others. Supposes that min < max.
void receiveThermalSources(const stdr_msgs::ThermalSourceVector &msg)
Receives the existent sound sources.
ros::Publisher _publisher
ROS tf listener.
~ThermalSensor(void)
Default destructor.