38 const auto old_linear_x = std::abs(old_twist.linear.x);
39 const auto new_linear_x = std::abs(new_twist.linear.x);
41 const auto old_angular_z = std::abs(old_twist.angular.z);
42 const auto new_angular_z = std::abs(new_twist.angular.z);
44 return (old_linear_x < new_linear_x ) ||
45 (old_angular_z < new_angular_z);
57 velocity_hs_ = boost::make_shared<velocity_topic_container>();
58 lock_hs_ = boost::make_shared<lock_topic_container>();
67 status_ = boost::make_shared<status_type>();
97 std::string name, topic;
100 for (
int i = 0; i < output.
size(); ++i)
109 topic_hs.emplace_back(nh, name, topic, timeout, priority,
this);
124 for (
const auto& lock_h : *
lock_hs_)
126 if (lock_h.isLocked())
128 auto tmp = lock_h.getPriority();
146 std::string velocity_name =
"NULL";
152 if (!velocity_h.isMasked(lock_priority))
154 const auto velocity_priority = velocity_h.getPriority();
155 if (priority < velocity_priority)
157 priority = velocity_priority;
158 velocity_name = velocity_h.getName();
163 return twist.getName() == velocity_name;