mirror of
https://github.com/moveit/moveit_task_constructor.git
synced 2025-09-27 00:29:13 +08:00
clang-format-14
This commit is contained in:
parent
cd0ab8838c
commit
4dfcf09516
@ -50,9 +50,13 @@
|
||||
#include <chrono>
|
||||
|
||||
// define pimpl() functions accessing correctly casted pimpl_ pointer
|
||||
#define PIMPL_FUNCTIONS(Class) \
|
||||
const Class##Private* Class::pimpl() const { return static_cast<const Class##Private*>(pimpl_); } \
|
||||
Class##Private* Class::pimpl() { return static_cast<Class##Private*>(pimpl_); }
|
||||
#define PIMPL_FUNCTIONS(Class) \
|
||||
const Class##Private* Class::pimpl() const { \
|
||||
return static_cast<const Class##Private*>(pimpl_); \
|
||||
} \
|
||||
Class##Private* Class::pimpl() { \
|
||||
return static_cast<Class##Private*>(pimpl_); \
|
||||
}
|
||||
|
||||
namespace moveit {
|
||||
namespace task_constructor {
|
||||
|
@ -241,8 +241,8 @@ double Clearance::operator()(const SubTrajectory& s, std::string& comment) const
|
||||
auto& state_properties{ state->properties() };
|
||||
auto& stage_properties{ s.creator()->properties() };
|
||||
request.group_name = state_properties.hasProperty(group_property) ?
|
||||
state_properties.get<std::string>(group_property) :
|
||||
stage_properties.get<std::string>(group_property);
|
||||
state_properties.get<std::string>(group_property) :
|
||||
stage_properties.get<std::string>(group_property);
|
||||
|
||||
// look at all forbidden collisions involving group_name
|
||||
request.enableGroup(state->scene()->getRobotModel());
|
||||
|
@ -289,7 +289,7 @@ void ComputeIK::compute() {
|
||||
if (value.empty()) { // property undefined
|
||||
// determine IK link from eef/group
|
||||
if (!(link = eef_jmg ? robot_model->getLinkModel(eef_jmg->getEndEffectorParentGroup().second) :
|
||||
jmg->getOnlyOneEndEffectorTip())) {
|
||||
jmg->getOnlyOneEndEffectorTip())) {
|
||||
ROS_WARN_STREAM_NAMED("ComputeIK", "Failed to derive IK target link");
|
||||
return;
|
||||
}
|
||||
|
@ -112,7 +112,7 @@ void ModifyPlanningScene::attachObjects(planning_scene::PlanningScene& scene,
|
||||
if (invert)
|
||||
attach = !attach;
|
||||
obj.object.operation = attach ? static_cast<int8_t>(moveit_msgs::CollisionObject::ADD) :
|
||||
static_cast<int8_t>(moveit_msgs::CollisionObject::REMOVE);
|
||||
static_cast<int8_t>(moveit_msgs::CollisionObject::REMOVE);
|
||||
for (const std::string& name : pair.second.first) {
|
||||
obj.object.id = name;
|
||||
scene.processAttachedCollisionObjectMsg(obj);
|
||||
|
@ -129,7 +129,7 @@ void SimpleGraspBase::setup(std::unique_ptr<Stage>&& generator, bool forward) {
|
||||
const std::string& eef = p.get<std::string>("eef");
|
||||
moveit_msgs::AttachedCollisionObject obj;
|
||||
obj.object.operation = forward ? static_cast<int8_t>(moveit_msgs::CollisionObject::ADD) :
|
||||
static_cast<int8_t>(moveit_msgs::CollisionObject::REMOVE);
|
||||
static_cast<int8_t>(moveit_msgs::CollisionObject::REMOVE);
|
||||
obj.link_name = scene->getRobotModel()->getEndEffector(eef)->getEndEffectorParentGroup().second;
|
||||
obj.object.id = p.get<std::string>("object");
|
||||
scene->processAttachedCollisionObjectMsg(obj);
|
||||
|
@ -119,7 +119,7 @@ void attachObject(PlanningScene& scene, const std::string& object, const std::st
|
||||
moveit_msgs::AttachedCollisionObject obj;
|
||||
obj.link_name = link;
|
||||
obj.object.operation = attach ? static_cast<int8_t>(moveit_msgs::CollisionObject::ADD) :
|
||||
static_cast<int8_t>(moveit_msgs::CollisionObject::REMOVE);
|
||||
static_cast<int8_t>(moveit_msgs::CollisionObject::REMOVE);
|
||||
obj.object.id = object;
|
||||
scene.processAttachedCollisionObjectMsg(obj);
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ class ScopedYamlEvent
|
||||
{
|
||||
public:
|
||||
~ScopedYamlEvent() { yaml_event_delete(&event_); }
|
||||
operator yaml_event_t const &() const { return event_; }
|
||||
operator yaml_event_t const&() const { return event_; }
|
||||
operator yaml_event_t&() { return event_; }
|
||||
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user