use std::collections::{HashMap, HashSet};
use r2r::{builtin_interfaces::msg::Time, geometry_msgs::msg::TransformStamped};
use thiserror::Error;
#[derive(Clone, Debug, Error)]
#[non_exhaustive]
pub enum TfError {
#[error("tf_r2r: AttemptedLookupInPast {:?} < {:?}",.0, .1)]
AttemptedLookupInPast(Time, Box<TransformStamped>),
#[error("tf_r2r: AttemptedLookupInFuture {:?} < {:?}",.0, .1)]
AttemptedLookUpInFuture(Box<TransformStamped>, Time),
#[error("tf_r2r: CouldNotFindTransform {} -> {} ({:?})", .0, .1, .2)]
CouldNotFindTransform(String, String, HashMap<String, HashSet<String>>),
#[error("tf_r2r: CouldNotAcquireLock")]
CouldNotAcquireLock,
#[error("tf_r2r: r2r error {:?}", .0)]
R2r(String),
}