Skip to content

Commit bb2babe

Browse files
committed
Update namespace name from kr_planning_rviz_plugins -> kr
per @versatran01 's request
1 parent 5e3e565 commit bb2babe

File tree

9 files changed

+48
-55
lines changed

9 files changed

+48
-55
lines changed

.github/workflows/cpplint-reviewdog.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ jobs:
55
cpplint:
66
runs-on: ubuntu-latest
77
steps:
8-
- uses: actions/checkout@master
9-
- uses: reviewdog/action-cpplint@master
10-
with:
11-
github_token: ${{ secrets.KR_AUTONOMOUS_FLIGHT_TOKEN_REVIEWDOG }}
12-
reporter: github-pr-check
13-
flags: --exclude=autonomy_core/map_plan/jps3d/include/jps/graph_search.h --exclude autonomy_core/map_plan/jps3d/src/graph_search.cpp --exclude autonomy_core/map_plan/planning_ros_utils/src/planning_rviz_plugins/map_display.h --exclude autonomy_core/state_machine/action_trackers/src/take_off_tracker.cpp --exclude autonomy_core/map_plan/mpl/include/mpl_basis/lambda.h --exclude autonomy_core/map_plan/mpl/include/mpl_planner/env_base.h --exclude autonomy_core/map_plan/mpl/src/env_base.cpp --exclude autonomy_core/map_plan/mpl/src/env_map.cpp
14-
filter: "-whitespace/comments,-whitespace/indent,-build/include_order,-whitespace/ending_newline,-runtime/references"
15-
# Note: runtime/references was added to address google benchmark
16-
# issues, as requested by https://github.com/KumarRobotics/kr_autonomous_flight/pull/171
8+
- uses: actions/checkout@master
9+
- uses: reviewdog/action-cpplint@master
10+
with:
11+
github_token: ${{ secrets.KR_AUTONOMOUS_FLIGHT_TOKEN_REVIEWDOG }}
12+
reporter: github-pr-check
13+
flags: --exclude=autonomy_core/map_plan/jps3d/include/jps/graph_search.h --exclude autonomy_core/map_plan/jps3d/src/graph_search.cpp --exclude autonomy_core/state_machine/action_trackers/src/take_off_tracker.cpp --exclude autonomy_core/map_plan/mpl/include/mpl_basis/lambda.h --exclude autonomy_core/map_plan/mpl/include/mpl_planner/env_base.h --exclude autonomy_core/map_plan/mpl/src/env_base.cpp --exclude autonomy_core/map_plan/mpl/src/env_map.cpp
14+
filter: "-whitespace/comments,-whitespace/indent,-build/include_order,-whitespace/ending_newline,-runtime/references"
15+
# Note: runtime/references was added to address google benchmark
16+
# issues, as requested by https://github.com/KumarRobotics/kr_autonomous_flight/pull/171

autonomy_core/client/client_launch/rviz/client.rviz

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,7 @@ Visualization Manager:
7676
Show Arrows: true
7777
Show Axes: true
7878
Show Names: true
79-
Tree:
80-
{}
79+
Tree: {}
8180
Update Interval: 0
8281
Value: false
8382
- Class: rviz/InteractiveMarkers
@@ -95,15 +94,14 @@ Visualization Manager:
9594
Enabled: true
9695
Marker Topic: /env_vis/env
9796
Name: Environment
98-
Namespaces:
99-
{}
97+
Namespaces: {}
10098
Queue Size: 100
10199
Value: true
102100
Enabled: false
103101
Name: Env
104102
- Class: rviz/Group
105103
Displays:
106-
- Class: planning_rviz_plugins/Path
104+
- Class: kr_planning_rviz_plugins/Path
107105
Enabled: true
108106
LineColor: 204; 51; 204
109107
LineScale: 0.4000000059604645
@@ -114,7 +112,7 @@ Visualization Manager:
114112
Topic: /quadrotor/global_plan_server/path
115113
Unreliable: false
116114
Value: true
117-
- Class: planning_rviz_plugins/Path
115+
- Class: kr_planning_rviz_plugins/Path
118116
Enabled: true
119117
LineColor: 0; 255; 0
120118
LineScale: 0.800000011920929
@@ -153,7 +151,7 @@ Visualization Manager:
153151
Use Fixed Frame: true
154152
Use rainbow: true
155153
Value: true
156-
- Class: planning_rviz_plugins/Path
154+
- Class: kr_planning_rviz_plugins/Path
157155
Enabled: true
158156
LineColor: 78; 154; 6
159157
LineScale: 0.800000011920929
@@ -167,7 +165,7 @@ Visualization Manager:
167165
- AccColor: 10; 200; 55
168166
AccScale: 0.014999999664723873
169167
AccVis: true
170-
Class: planning_rviz_plugins/Trajectory
168+
Class: kr_planning_rviz_plugins/Trajectory
171169
Enabled: true
172170
JrkColor: 200; 20; 55
173171
JrkScale: 0.014999999664723873
@@ -189,7 +187,7 @@ Visualization Manager:
189187
YawTriangleAngle: 0.699999988079071
190188
YawTriangleScale: 0.5
191189
YawVis: true
192-
- Class: planning_rviz_plugins/Path
190+
- Class: kr_planning_rviz_plugins/Path
193191
Enabled: true
194192
LineColor: 0; 170; 255
195193
LineScale: 0.5
@@ -222,7 +220,7 @@ Visualization Manager:
222220
Axis: Z
223221
BoundScale: 0.5
224222
Channel Name: intensity
225-
Class: planning_rviz_plugins/VoxelMap
223+
Class: kr_planning_rviz_plugins/VoxelMap
226224
Color: 239; 41; 41
227225
Color Transformer: AxisColor
228226
Decay Time: 0
@@ -255,7 +253,7 @@ Visualization Manager:
255253
Axis: Z
256254
BoundScale: 3
257255
Channel Name: intensity
258-
Class: planning_rviz_plugins/VoxelMap
256+
Class: kr_planning_rviz_plugins/VoxelMap
259257
Color: 252; 233; 79
260258
Color Transformer: FlatColor
261259
Decay Time: 0

autonomy_core/map_plan/action_planner/src/global_plan_server.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -257,8 +257,8 @@ void GlobalPlanServer::process_goal() {
257257
}
258258

259259
// record current odometry as start
260-
start.pos = kr_planning_rviz_plugins::pose_to_eigen(odom_msg_->pose.pose);
261-
goal.pos = kr_planning_rviz_plugins::pose_to_eigen(goal_->p_final);
260+
start.pos = kr::pose_to_eigen(odom_msg_->pose.pose);
261+
goal.pos = kr::pose_to_eigen(goal_->p_final);
262262

263263
// call the planner
264264

@@ -395,7 +395,7 @@ bool GlobalPlanServer::global_plan_process(
395395
}
396396

397397
// publish global_path_msg_
398-
global_path_msg_ = kr_planning_rviz_plugins::path_to_ros(global_path);
398+
global_path_msg_ = kr::path_to_ros(global_path);
399399
global_path_msg_.header.frame_id = map_frame;
400400
path_pub_.publish(global_path_msg_);
401401
}
@@ -414,7 +414,7 @@ bool GlobalPlanServer::global_plan_process(
414414
}
415415

416416
// publish
417-
global_path_msg_ = kr_planning_rviz_plugins::path_to_ros(global_path);
417+
global_path_msg_ = kr::path_to_ros(global_path);
418418
global_path_msg_.header.frame_id = map_frame;
419419
path_pub_.publish(global_path_msg_);
420420
}

autonomy_core/map_plan/action_planner/src/local_plan_server.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -325,10 +325,10 @@ void LocalPlanServer::process_goal() {
325325
MPL::Waypoint3D start, goal;
326326
// instead of using current odometry as start, we use the given start position
327327
// for consistency between old and new trajectories in replan process
328-
start.pos = kr_planning_rviz_plugins::pose_to_eigen(goal_->p_init);
329-
start.vel = kr_planning_rviz_plugins::twist_to_eigen(goal_->v_init);
330-
start.acc = kr_planning_rviz_plugins::twist_to_eigen(goal_->a_init);
331-
start.jrk = kr_planning_rviz_plugins::twist_to_eigen(goal_->j_init);
328+
start.pos = kr::pose_to_eigen(goal_->p_init);
329+
start.vel = kr::twist_to_eigen(goal_->v_init);
330+
start.acc = kr::twist_to_eigen(goal_->a_init);
331+
start.jrk = kr::twist_to_eigen(goal_->j_init);
332332

333333
// Important: define use position, velocity, acceleration or jerk as control
334334
// inputs, note that the lowest order "false" term will be used as control
@@ -342,10 +342,10 @@ void LocalPlanServer::process_goal() {
342342
// in trajectory_tracker)
343343
start.use_yaw = false;
344344

345-
goal.pos = kr_planning_rviz_plugins::pose_to_eigen(goal_->p_final);
346-
goal.vel = kr_planning_rviz_plugins::twist_to_eigen(goal_->v_final);
347-
goal.acc = kr_planning_rviz_plugins::twist_to_eigen(goal_->a_final);
348-
goal.jrk = kr_planning_rviz_plugins::twist_to_eigen(goal_->j_final);
345+
goal.pos = kr::pose_to_eigen(goal_->p_final);
346+
goal.vel = kr::twist_to_eigen(goal_->v_final);
347+
goal.acc = kr::twist_to_eigen(goal_->a_final);
348+
goal.jrk = kr::twist_to_eigen(goal_->j_final);
349349
goal.use_yaw = start.use_yaw;
350350
goal.use_pos = start.use_pos;
351351
goal.use_vel = start.use_vel;
@@ -440,7 +440,7 @@ bool LocalPlanServer::local_plan_process(
440440
vec_Vec3f sg;
441441
sg.push_back(start.pos);
442442
sg.push_back(goal.pos);
443-
kr_planning_msgs::Path sg_msg = kr_planning_rviz_plugins::path_to_ros(sg);
443+
kr_planning_msgs::Path sg_msg = kr::path_to_ros(sg);
444444
std::string map_frame; // set frame id
445445
map_frame = map.header.frame_id;
446446
sg_msg.header.frame_id = map_frame;
@@ -458,7 +458,7 @@ bool LocalPlanServer::local_plan_process(
458458
}
459459

460460
// for visualization: publish expanded nodes as a point cloud
461-
sensor_msgs::PointCloud expanded_ps = kr_planning_rviz_plugins::vec_to_cloud(
461+
sensor_msgs::PointCloud expanded_ps = kr::vec_to_cloud(
462462
mp_planner_util_->getExpandedNodes());
463463
expanded_ps.header.frame_id = map_frame;
464464
expanded_cloud_pub.publish(expanded_ps);

autonomy_core/map_plan/mapper/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ find_package(
1212
depth_image_proc
1313
sensor_msgs
1414
eigen_conversions
15-
tf_conversions)
15+
tf_conversions
16+
motion_primitive_library)
1617

1718
find_package(Boost REQUIRED COMPONENTS timer)
1819

autonomy_core/map_plan/mapper/launch/test.rviz

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Visualization Manager:
7373
Axis: Z
7474
BoundScale: 0.10000000149011612
7575
Channel Name: intensity
76-
Class: planning_rviz_plugins/VoxelMap
76+
Class: kr_planning_rviz_plugins/VoxelMap
7777
Color: 164; 0; 0
7878
Color Transformer: FlatColor
7979
Decay Time: 0
@@ -168,13 +168,10 @@ Visualization Manager:
168168
Show Names: true
169169
Tree:
170170
world:
171-
base_link:
172-
{}
173-
map:
174-
{}
171+
base_link: {}
172+
map: {}
175173
vision:
176-
odom:
177-
{}
174+
odom: {}
178175
Update Interval: 0
179176
Value: true
180177
- Alpha: 1

autonomy_core/map_plan/mapper/src/local_global_mapper.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -272,10 +272,8 @@ void LocalGlobalMapperNode::processCloud(const sensor_msgs::PointCloud& cloud) {
272272
geometry_msgs::Pose pose_odom_lidar;
273273
getLidarPoses(cloud.header, &pose_map_lidar, &pose_odom_lidar);
274274

275-
const Eigen::Affine3d T_map_lidar =
276-
kr_planning_rviz_plugins::toTF(pose_map_lidar);
277-
const Eigen::Affine3d T_odom_lidar =
278-
kr_planning_rviz_plugins::toTF(pose_odom_lidar);
275+
const Eigen::Affine3d T_map_lidar = kr::toTF(pose_map_lidar);
276+
const Eigen::Affine3d T_odom_lidar = kr::toTF(pose_odom_lidar);
279277

280278
// This is the lidar position in the odom frame, used for raytracing &
281279
// cropping local map
@@ -295,8 +293,7 @@ void LocalGlobalMapperNode::processCloud(const sensor_msgs::PointCloud& cloud) {
295293
double min_range = 0.75; // points within this distance will be discarded
296294
double min_range_squared;
297295
min_range_squared = min_range * min_range;
298-
const auto pts =
299-
kr_planning_rviz_plugins::cloud_to_vec_filter(cloud, min_range_squared);
296+
const auto pts = kr::cloud_to_vec_filter(cloud, min_range_squared);
300297

301298
timer.start();
302299
// local raytracing using lidar position in the map frame (not odom frame)

autonomy_core/state_machine/state_machine_core/src/local_global_replan_server.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66
void RePlanner::GlobalPathCb(const kr_planning_msgs::Path& path) {
77
global_path_.clear();
8-
global_path_ = kr_planning_rviz_plugins::ros_to_path(
8+
global_path_ = kr::ros_to_path(
99
path); // extract the global path information
1010
}
1111

@@ -283,7 +283,7 @@ void RePlanner::setup_replanner() {
283283
}
284284
auto global_result = global_plan_client_->getResult();
285285
if (global_result->success) {
286-
global_path_ = kr_planning_rviz_plugins::ros_to_path(
286+
global_path_ = kr::ros_to_path(
287287
global_result->path); // extract the global path information
288288
ROS_WARN("initial global plan succeeded!");
289289
} else {
@@ -460,7 +460,7 @@ bool RePlanner::PlanTrajectory(int horizon) {
460460
&local_tpgoal.a_init,
461461
&local_tpgoal.j_init);
462462
Vec3f start_pos;
463-
start_pos = kr_planning_rviz_plugins::pose_to_eigen(local_tpgoal.p_init);
463+
start_pos = kr::pose_to_eigen(local_tpgoal.p_init);
464464

465465
// Replan step 1: Global plan
466466
// ########################################################################################################
@@ -772,7 +772,7 @@ vec_Vec3f RePlanner::PathCropIntersect(const vec_Vec3f& path) {
772772

773773
// publish for visualization
774774
kr_planning_msgs::Path local_path_msg_ =
775-
kr_planning_rviz_plugins::path_to_ros(cropped_path);
775+
kr::path_to_ros(cropped_path);
776776
local_path_msg_.header.frame_id = map_frame_;
777777
cropped_path_pub_.publish(local_path_msg_);
778778

@@ -817,7 +817,7 @@ vec_Vec3f RePlanner::TransformGlobalPath(const vec_Vec3f& path_original) {
817817
map_to_odom.orientation.z = transformStamped.transform.rotation.z;
818818

819819
// TF transform from the map frame to odom frame
820-
auto map_to_odom_tf = kr_planning_rviz_plugins::toTF(map_to_odom);
820+
auto map_to_odom_tf = kr::toTF(map_to_odom);
821821
Vec3f waypoint_wrt_map;
822822

823823
vec_Vec3f path_wrt_map;
@@ -829,7 +829,7 @@ vec_Vec3f RePlanner::TransformGlobalPath(const vec_Vec3f& path_original) {
829829

830830
// publish transformed global path for visualization
831831
kr_planning_msgs::Path path_wrt_map_msg =
832-
kr_planning_rviz_plugins::path_to_ros(path_wrt_map);
832+
kr::path_to_ros(path_wrt_map);
833833
path_wrt_map_msg.header.frame_id = map_frame_;
834834
global_path_wrt_map_pub_.publish(path_wrt_map_msg);
835835
return path_wrt_map;

autonomy_sim/unity_sim/dcist_utils/rviz/sim.rviz

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ Visualization Manager:
193193
Use Fixed Frame: true
194194
Use rainbow: true
195195
Value: false
196-
- Class: planning_rviz_plugins/PathArray
196+
- Class: kr_planning_rviz_plugins/PathArray
197197
Enabled: true
198198
ID: All
199199
LineColor: 204; 51; 204

0 commit comments

Comments
 (0)