Fix rolling compatibility with jammy

Fix compile warning
Update clang-format version to 12
This commit is contained in:
JafarAbdi 2022-04-05 15:58:19 +00:00 committed by AndyZe
parent 8d3b66e98c
commit dfb5769b0d
6 changed files with 9 additions and 9 deletions

View File

@ -15,8 +15,8 @@ jobs:
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: actions/setup-python@v2 - uses: actions/setup-python@v2
- name: Install clang-format-10 - name: Install clang-format-12
run: sudo apt-get install clang-format-10 run: sudo apt-get install clang-format-12
- uses: pre-commit/action@v2.0.0 - uses: pre-commit/action@v2.0.0
id: precommit id: precommit
- name: Upload pre-commit changes - name: Upload pre-commit changes

View File

@ -38,7 +38,7 @@ repos:
- id: clang-format - id: clang-format
name: clang-format name: clang-format
description: Format files with ClangFormat. description: Format files with ClangFormat.
entry: clang-format-10 entry: clang-format-12
language: system language: system
files: \.(c|cc|cxx|cpp|frag|glsl|h|hpp|hxx|ih|ispc|ipp|java|js|m|proto|vert)$ files: \.(c|cc|cxx|cpp|frag|glsl|h|hpp|hxx|ih|ispc|ipp|java|js|m|proto|vert)$
args: ['-fallback-style=none', '-i'] args: ['-fallback-style=none', '-i']

View File

@ -185,8 +185,8 @@ double Clearance::operator()(const SubTrajectory& s, std::string& comment) const
auto& state_properties{ state->properties() }; auto& state_properties{ state->properties() };
auto& stage_properties{ s.creator()->properties() }; auto& stage_properties{ s.creator()->properties() };
request.group_name = state_properties.hasProperty(group_property) ? request.group_name = state_properties.hasProperty(group_property) ?
state_properties.get<std::string>(group_property) : state_properties.get<std::string>(group_property) :
stage_properties.get<std::string>(group_property); stage_properties.get<std::string>(group_property);
// look at all forbidden collisions involving group_name // look at all forbidden collisions involving group_name
request.enableGroup(state->scene()->getRobotModel()); request.enableGroup(state->scene()->getRobotModel());

View File

@ -282,7 +282,7 @@ void ComputeIK::compute() {
if (value.empty()) { // property undefined if (value.empty()) { // property undefined
// determine IK link from eef/group // determine IK link from eef/group
if (!(link = eef_jmg ? robot_model->getLinkModel(eef_jmg->getEndEffectorParentGroup().second) : if (!(link = eef_jmg ? robot_model->getLinkModel(eef_jmg->getEndEffectorParentGroup().second) :
jmg->getOnlyOneEndEffectorTip())) { jmg->getOnlyOneEndEffectorTip())) {
RCLCPP_WARN_STREAM(LOGGER, "Failed to derive IK target link"); RCLCPP_WARN_STREAM(LOGGER, "Failed to derive IK target link");
return; return;
} }

View File

@ -132,7 +132,7 @@ void SimpleGraspBase::setup(std::unique_ptr<Stage>&& generator, bool forward) {
const std::string& eef = p.get<std::string>("eef"); const std::string& eef = p.get<std::string>("eef");
moveit_msgs::msg::AttachedCollisionObject obj; moveit_msgs::msg::AttachedCollisionObject obj;
obj.object.operation = forward ? (int8_t)moveit_msgs::msg::CollisionObject::ADD : obj.object.operation = forward ? (int8_t)moveit_msgs::msg::CollisionObject::ADD :
(int8_t)moveit_msgs::msg::CollisionObject::REMOVE; (int8_t)moveit_msgs::msg::CollisionObject::REMOVE;
obj.link_name = scene->getRobotModel()->getEndEffector(eef)->getEndEffectorParentGroup().second; obj.link_name = scene->getRobotModel()->getEndEffector(eef)->getEndEffectorParentGroup().second;
obj.object.id = p.get<std::string>("object"); obj.object.id = p.get<std::string>("object");
scene->processAttachedCollisionObjectMsg(obj); scene->processAttachedCollisionObjectMsg(obj);

View File

@ -91,8 +91,8 @@ TaskPanel::TaskPanel(QWidget* parent) : rviz_common::Panel(parent), d_ptr(new Ta
Q_D(TaskPanel); Q_D(TaskPanel);
// sync checked tool button with displayed widget // sync checked tool button with displayed widget
connect(d->tool_buttons_group, static_cast<void (QButtonGroup::*)(int)>(&QButtonGroup::buttonClicked), connect(d->tool_buttons_group, static_cast<void (QButtonGroup::*)(int)>(&QButtonGroup::idClicked), d->stackedWidget,
d->stackedWidget, [d](int index) { d->stackedWidget->setCurrentIndex(index); }); [d](int index) { d->stackedWidget->setCurrentIndex(index); });
connect(d->stackedWidget, &QStackedWidget::currentChanged, d->tool_buttons_group, connect(d->stackedWidget, &QStackedWidget::currentChanged, d->tool_buttons_group,
[d](int index) { d->tool_buttons_group->button(index)->setChecked(true); }); [d](int index) { d->tool_buttons_group->button(index)->setChecked(true); });