Skip to content

Commit 3e78922

Browse files
authored
CI: Fix compiler warnings and enable -Werror (#752)
* Fix old-style-cast * Fix deprecated member names (due to moveit/moveit#3244) * Enable -Werror
1 parent 3ec3ce1 commit 3e78922

File tree

4 files changed

+12
-11
lines changed

4 files changed

+12
-11
lines changed

.github/workflows/ci.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,16 @@ jobs:
1616
strategy:
1717
matrix:
1818
env:
19-
- IMAGE: master-source
20-
- IMAGE: noetic-source
19+
- IMAGE: master-source # MoveIt master branch built on Melodic
20+
- IMAGE: noetic-source # MoveIt master branch built on Noetic
2121
env:
2222
DOCKER_IMAGE: moveit/moveit:${{ matrix.env.IMAGE }}
2323
UNDERLAY: /root/ws_moveit/install
2424
CATKIN_LINT: true
2525
CCACHE_DIR: ${{ github.workspace }}/.ccache
2626
BASEDIR: ${{ github.workspace }}/.work
2727
CLANG_TIDY_BASE_REF: ${{ github.base_ref || github.ref }}
28+
CXXFLAGS: -Wall -Wextra -Wwrite-strings -Wunreachable-code -Wpointer-arith -Wredundant-decls
2829

2930
name: ${{ matrix.env.IMAGE }}${{ matrix.env.CATKIN_LINT && ' + catkin_lint' || ''}}${{ matrix.env.CLANG_TIDY && ' + clang-tidy' || '' }}
3031
runs-on: ubuntu-latest

doc/bullet_collision_checker/src/bullet_collision_checker_tutorial.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ void computeCollisionContactPoints(InteractiveRobot& robot)
114114

115115
if (c_res.collision)
116116
{
117-
ROS_INFO("COLLIDING contact_point_count=%d", (int)c_res.contact_count);
117+
ROS_INFO_STREAM("COLLIDING contact_point_count=" << c_res.contact_count);
118118
if (c_res.contact_count > 0)
119119
{
120120
std_msgs::ColorRGBA color;

doc/moveit_cpp/src/moveit_cpp_tutorial.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ int main(int argc, char** argv)
9292
visual_tools.publishAxisLabeled(target_pose1.pose, "target_pose");
9393
visual_tools.publishText(text_pose, "Goal Pose", rvt::WHITE, rvt::XLARGE);
9494
// Visualize the trajectory in Rviz
95-
visual_tools.publishTrajectoryLine(plan_solution1.trajectory, joint_model_group_ptr);
95+
visual_tools.publishTrajectoryLine(plan_solution1.trajectory_, joint_model_group_ptr);
9696
visual_tools.trigger();
9797

9898
/* Uncomment if you want to execute the plan */
@@ -131,13 +131,13 @@ int main(int argc, char** argv)
131131
if (plan_solution2)
132132
{
133133
moveit::core::RobotState robot_state(robot_model_ptr);
134-
moveit::core::robotStateMsgToRobotState(plan_solution2.start_state, robot_state);
134+
moveit::core::robotStateMsgToRobotState(plan_solution2.start_state_, robot_state);
135135

136136
visual_tools.publishText(text_pose, "Start Pose", rvt::WHITE, rvt::XLARGE);
137137
visual_tools.publishAxisLabeled(robot_state.getGlobalLinkTransform("panda_link8"), "start_pose");
138138
visual_tools.publishText(text_pose, "Goal Pose", rvt::WHITE, rvt::XLARGE);
139139
visual_tools.publishAxisLabeled(target_pose1.pose, "target_pose");
140-
visual_tools.publishTrajectoryLine(plan_solution2.trajectory, joint_model_group_ptr);
140+
visual_tools.publishTrajectoryLine(plan_solution2.trajectory_, joint_model_group_ptr);
141141
visual_tools.trigger();
142142

143143
/* Uncomment if you want to execute the plan */
@@ -176,13 +176,13 @@ int main(int argc, char** argv)
176176
if (plan_solution3)
177177
{
178178
moveit::core::RobotState robot_state(robot_model_ptr);
179-
moveit::core::robotStateMsgToRobotState(plan_solution3.start_state, robot_state);
179+
moveit::core::robotStateMsgToRobotState(plan_solution3.start_state_, robot_state);
180180

181181
visual_tools.publishText(text_pose, "Start Pose", rvt::WHITE, rvt::XLARGE);
182182
visual_tools.publishAxisLabeled(robot_state.getGlobalLinkTransform("panda_link8"), "start_pose");
183183
visual_tools.publishText(text_pose, "Goal Pose", rvt::WHITE, rvt::XLARGE);
184184
visual_tools.publishAxisLabeled(target_pose2, "target_pose");
185-
visual_tools.publishTrajectoryLine(plan_solution3.trajectory, joint_model_group_ptr);
185+
visual_tools.publishTrajectoryLine(plan_solution3.trajectory_, joint_model_group_ptr);
186186
visual_tools.trigger();
187187

188188
/* Uncomment if you want to execute the plan */
@@ -219,13 +219,13 @@ int main(int argc, char** argv)
219219
if (plan_solution4)
220220
{
221221
moveit::core::RobotState robot_state(robot_model_ptr);
222-
moveit::core::robotStateMsgToRobotState(plan_solution4.start_state, robot_state);
222+
moveit::core::robotStateMsgToRobotState(plan_solution4.start_state_, robot_state);
223223

224224
visual_tools.publishText(text_pose, "Start Pose", rvt::WHITE, rvt::XLARGE);
225225
visual_tools.publishAxisLabeled(robot_state.getGlobalLinkTransform("panda_link8"), "start_pose");
226226
visual_tools.publishText(text_pose, "Goal Pose", rvt::WHITE, rvt::XLARGE);
227227
visual_tools.publishAxisLabeled(robot_start_state->getGlobalLinkTransform("panda_link8"), "target_pose");
228-
visual_tools.publishTrajectoryLine(plan_solution4.trajectory, joint_model_group_ptr);
228+
visual_tools.publishTrajectoryLine(plan_solution4.trajectory_, joint_model_group_ptr);
229229
visual_tools.trigger();
230230

231231
/* Uncomment if you want to execute the plan */

doc/visualizing_collisions/src/visualizing_collisions_tutorial.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ void computeCollisionContactPoints(InteractiveRobot& robot)
128128
// for how.
129129
if (c_res.collision)
130130
{
131-
ROS_INFO("COLLIDING contact_point_count=%d", (int)c_res.contact_count);
131+
ROS_INFO_STREAM("COLLIDING contact_point_count" << c_res.contact_count);
132132
if (c_res.contact_count > 0)
133133
{
134134
std_msgs::ColorRGBA color;

0 commit comments

Comments
 (0)