58 conn_->openCollectionPtr<moveit_msgs::TrajectoryConstraints>(
DATABASE_NAME,
"trajectory_constraints");
69 const moveit_msgs::TrajectoryConstraints& msg,
const std::string& name,
const std::string& robot,
70 const std::string& group)
83 ROS_DEBUG(
"%s constraints '%s'", replace ?
"Replaced" :
"Added", name.c_str());
87 const std::string& robot,
88 const std::string& group)
const 97 return !constr.empty();
101 std::vector<std::string>& names,
102 const std::string& robot,
103 const std::string& group)
const 110 const std::string& robot,
111 const std::string& group)
const 119 std::vector<TrajectoryConstraintsWithMetadata> constr =
121 for (std::size_t i = 0; i < constr.size(); ++i)
127 const std::string& name,
128 const std::string& robot,
129 const std::string& group)
const 142 msg_m = constr.back();
148 const std::string& new_name,
149 const std::string& robot,
150 const std::string& group)
161 ROS_DEBUG(
"Renamed constraints from '%s' to '%s'", old_name.c_str(), new_name.c_str());
165 const std::string& robot,
166 const std::string& group)
175 ROS_DEBUG(
"Removed %u TrajectoryConstraints messages (named '%s')", rem, name.c_str());
void filterNames(const std::string ®ex, std::vector< std::string > &names) const
Keep only the names that match regex.
void createCollections(void)
warehouse_ros::DatabaseConnection::Ptr conn_
void addTrajectoryConstraints(const moveit_msgs::TrajectoryConstraints &msg, const std::string &name, const std::string &robot="", const std::string &group="")
This class provides the mechanism to connect to a database and reads needed ROS parameters when appro...
TrajectoryConstraintsStorage(warehouse_ros::DatabaseConnection::Ptr conn)
void getKnownTrajectoryConstraints(std::vector< std::string > &names, const std::string &robot="", const std::string &group="") const
bool getTrajectoryConstraints(TrajectoryConstraintsWithMetadata &msg_m, const std::string &name, const std::string &robot="", const std::string &group="") const
Get the constraints named name. Return false on failure.
void removeTrajectoryConstraints(const std::string &name, const std::string &robot="", const std::string &group="")
TrajectoryConstraintsCollection constraints_collection_
static const std::string CONSTRAINTS_ID_NAME
static const std::string CONSTRAINTS_GROUP_NAME
bool hasTrajectoryConstraints(const std::string &name, const std::string &robot="", const std::string &group="") const
void renameTrajectoryConstraints(const std::string &old_name, const std::string &new_name, const std::string &robot="", const std::string &group="")
static const std::string DATABASE_NAME
static const std::string ROBOT_NAME