37 const nav_msgs::OccupancyGrid& map,
38 const std::string& name,
40 const geometry_msgs::Pose2D& sensorPose,
41 const std::string& sensorFrameId,
42 float updateFrequency)
46 _sensorPose(sensorPose),
47 _sensorFrameId(sensorFrameId),
48 _updateFrequency(updateFrequency),
const std::string & _namespace
< The base for the sensor frame_id
tf::TransformListener _tfListener
ROS transform from sensor to map.
void checkAndUpdateSensor(const ros::TimerEvent &ev)
Checks if transform is available and calls updateSensorCallback()
The main namespace for STDR Robot.
void updateTransform(const ros::TimerEvent &ev)
Function for updating the sensor tf transform.
ros::Timer _timer
A ROS timer for updating the sensor tf.
virtual void updateSensorCallback(void)=0
Virtual function for sensor value callback. Implement this function on derived class to publish senso...
Sensor(const nav_msgs::OccupancyGrid &map, const std::string &name, ros::NodeHandle &n, const geometry_msgs::Pose2D &sensorPose, const std::string &sensorFrameId, float updateFrequency)
Default constructor.
tf::StampedTransform _sensorTransform
True if sensor got the _sensorTransform.
Timer createTimer(Rate r, Handler h, Obj o, bool oneshot=false, bool autostart=true) const
ros::Timer _tfTimer
ROS publisher for posting the sensor measurements.
const std::string _sensorFrameId
A ROS timer for updating the sensor values.