-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathdriver.diff
2547 lines (2449 loc) · 88.1 KB
/
driver.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f4c2634..e29e5c1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -53,6 +53,7 @@ find_package(catkin REQUIRED COMPONENTS
inekf_msgs
planner_msgs
grid_map_msgs
+ rviz_visual_tools
)
find_package(PCL 1.2 REQUIRED)
@@ -65,6 +66,7 @@ catkin_package(
Eigen3
grid_map_ros
grid_map_core
+ CATKIN_DEPENDS geometry_msgs
)
@@ -131,6 +133,29 @@ add_dependencies(test_udp ${${PROJECT_NAME}_EXPORTED_TARGETS}
target_link_libraries(test_udp ${catkin_LIBRARIES} ${PCL_LIBRARIES}
)
+add_executable(test_rviz_tool src/test_rviz_tool.cpp src/fake_map.cpp
+ src/multivariate_gaussian.cpp src/clf_rrt.cpp src/cassie_rrt_tree.cpp src/lyapunov_distance.cpp
+ src/local_chart.cpp src/standalone_lyapunov_distance.cpp src/local_map.cpp
+ src/map_operation.cpp
+ src/sample_pose.cpp src/pose.cpp
+ src/lyapunov_path.cpp
+ src/standalone_local_chart.cpp
+ src/standalone_omni_local_chart.cpp
+ src/standalone_omni_lyapunov_distance.cpp
+ src/omni_local_chart.cpp
+ src/utils/plotting.cpp
+ src/map_cost.cpp
+ src/communication.cpp
+ src/planner_info_to_controller_t.c
+ src/controller_info_to_planner_t.c
+ src/driver.cpp
+ src/control_commands.cpp
+ src/lie_group.cpp
+)
+add_dependencies(test_rviz_tool ${${PROJECT_NAME}_EXPORTED_TARGETS}
+ ${catkin_EXPORTED_TARGETS})
+target_link_libraries(test_rviz_tool ${catkin_LIBRARIES} ${PCL_LIBRARIES}
+)
add_executable(unit_test src/unit_test.cpp src/fake_map.cpp
src/multivariate_gaussian.cpp src/clf_rrt.cpp src/cassie_rrt_tree.cpp src/lyapunov_distance.cpp
diff --git a/config/local_map.yaml b/config/local_map.yaml
index 33c2c4a..4c672b3 100644
--- a/config/local_map.yaml
+++ b/config/local_map.yaml
@@ -7,9 +7,15 @@ local_map:
# <often use on flat ground>
# 5: include mode1, mode2 and then assign a cell as unknown if any obstacle exists
# between the cell and the robot
- mode: 5
+ # 6: include mode1, mode2, and estimate planes
+ # 7: include mode1, mode2, eatiamte planes and publish terrain information
+ mode: 6
obstacle_threshold: 0.3 # cost beyond this (0.5), will be considered obstacles
length: 6 # length of local map, including front and back (being too small will result in too much computation time)
smooth_radius: 0.1 # 0.2, 2, 0.5
SDF_radius: 1 # use Spiral iterator and stop when find an obstalce (signed distance field)
nan_percentage_in_radius: 0.8 # 0.5, 0.8, 0.7
+
+
+
+
diff --git a/config/plane.yaml b/config/plane.yaml
new file mode 100644
index 0000000..773a8f3
--- /dev/null
+++ b/config/plane.yaml
@@ -0,0 +1,29 @@
+###################
+# plane computation
+# #################
+# -------------------------------- ^
+# / / |
+# / / |
+# / / | delta_x
+# / / |
+# / / |
+# --------------------------------- v
+# ... -> num_planes
+# -------------------------------- ^
+# / / |
+# / / |
+# / / | delta_x
+# / / \ / |
+# / | robot_pose / |
+# --------------------------------- v
+#
+# <------------------------------->
+# 2*delta_y
+#
+#
+plane_params:
+ delta_x: 0.3
+ delta_y: 0.3
+ num_planes: 5
+
+
diff --git a/include/clf_rrt.h b/include/clf_rrt.h
index 24210f0..48b8a4e 100644
--- a/include/clf_rrt.h
+++ b/include/clf_rrt.h
@@ -251,6 +251,17 @@ private:
public:
+ CLFRRTStarPlanner(const grid_map::GridMap& map,
+ const local_map_params_t& local_map_params,
+ const pose_t& start_pose,
+ const pose_t& goal_pose,
+ robot_state_t& robot_state,
+ pose_sampler_params_t& pose_sampler_params,
+ rrt_params_t& rrt_params,
+ cost_params_t& cost_map_params,
+ lyapunov_distance_params_t& lyap_dist_params,
+ const terrain_plane_params_t& terrain_palne_params);
+
CLFRRTStarPlanner(const grid_map::GridMap& map,
const local_map_params_t& local_map_params,
const pose_t& start_pose,
diff --git a/include/control_commands.h b/include/control_commands.h
index 34bda55..6c0b23d 100644
--- a/include/control_commands.h
+++ b/include/control_commands.h
@@ -36,6 +36,8 @@
#include "point.h"
#include "inekf_msgs/State.h"
#include "planner_msgs/State.h"
+#include "utils/plane.h"
+
namespace bipedlab
@@ -79,6 +81,12 @@ planner_msgs::State
convertToPlannerMsg(const planner_info_to_controller_t& data,
const ros::Time& time,
const std::string& frame_id);
+planner_msgs::State
+convertToPlannerMsgWithPlane(const planner_info_to_controller_t& data,
+ const std::shared_ptr<std::vector<plane::terrain_info_t>> terrain_plane_ptr,
+ const ros::Time& time,
+ const std::string& frame_id);
+
diff --git a/include/driver.h b/include/driver.h
index 8ed1235..2949091 100644
--- a/include/driver.h
+++ b/include/driver.h
@@ -73,6 +73,8 @@
#include "inekf_msgs/State.h"
#include "planner_msgs/State.h"
+#include "rviz_visual_tools/rviz_visual_tools.h"
+
// #include <stdio.h>
@@ -392,11 +394,17 @@ private:
ros::Publisher rrt_path_pub_; // publish path from the rrt
ros::Publisher planner_path_pub_; // publish path from the planner
ros::Publisher planner_command_pub_; // publish path from the planner
+ // ros::Publisher planner_terrain_pub_; // publish terrain_info from the planner
ros::Publisher trajectory_pub_; // publish robot trajectory
ros::Publisher marker_pub_;
ros::Publisher marker_array_pub_;
double marker_lifetime_;
+
+ // rviz tool
+ rviz_visual_tools::RvizVisualToolsPtr visual_tools_;
+
+
// ros::Publisher frontier_publisher_;
// ros::Publisher side_walk_publisher_;
@@ -507,6 +515,8 @@ private:
goal_searching_for_planner_t goal_searching_;
goal_selection_for_robot_t goal_selection_;
communication_t udp_info_;
+ terrain_plane_params_t terrain_plane_params_;
+
int is_exploration_;
diff --git a/include/local_map.h b/include/local_map.h
index b048377..48b8ab6 100644
--- a/include/local_map.h
+++ b/include/local_map.h
@@ -37,6 +37,7 @@
#include "pose.h"
#include "robot_state.h"
+#include "utils/plane.h"
#include "cost_params_t.h"
#include "utils/debugger.h"
@@ -66,6 +67,16 @@ typedef struct local_map_info
mode(mode), obstacle_threshold(obstacle_threshold), length(length) { }
} local_map_params_t;
+
+typedef struct terrain_plane_params
+{
+ double delta_x;
+ double delta_y;
+ int num_planes;
+ terrain_plane_params(void): delta_x(0.3), delta_y(0.3), num_planes(5) { }
+} terrain_plane_params_t;
+
+
class LocalMap
{
private:
@@ -73,12 +84,20 @@ private:
const grid_map::GridMap* map_;
const pose_t* current_pose_;
local_map_params_t local_map_info_;
+ terrain_plane_params_t terrain_plane_params_;
+ std::shared_ptr<std::vector<plane::terrain_info_t>> terrain_ptr_;
+
public:
LocalMap(const pose_t* current_pose,
const grid_map::GridMap* map,
- const local_map_params_t& local_map_info_);
+ const local_map_params_t& local_map_info,
+ const terrain_plane_params_t& terrain_plane_params);
+
+ LocalMap(const pose_t* current_pose,
+ const grid_map::GridMap* map,
+ const local_map_params_t& local_map_info);
bool isNeighborObstacleFree(
const double& x, const double& y, const double& radius = 0.1) const;
@@ -86,6 +105,8 @@ public:
void updateLocalMap(const pose_t& current_pose);
void printMapAddress(void) { debugger::debugOutput("[In LocalMap()] &(global_map_ in Planner == map_): ", map_, 5);};
+ std::shared_ptr<std::vector<plane::terrain_info_t>> getTerrainInfo(void) const { return terrain_ptr_; };
+
grid_map::GridMap local_map;
// grid_map::GridMap* local_map_ptr;
diff --git a/include/map_operation.h b/include/map_operation.h
index d6273f9..d03c5a0 100644
--- a/include/map_operation.h
+++ b/include/map_operation.h
@@ -29,6 +29,7 @@
*/
#include <grid_map_ros/grid_map_ros.hpp>
#include <grid_map_msgs/GridMap.h>
+#include "utils/plane.h"
#include "pose.h"
@@ -147,6 +148,32 @@ void assignUnknownBehindObstacles(grid_map::GridMap& map,
const std::string compute_on_layer,
const std::string apply_to_layer);
+std::shared_ptr<std::vector<plane::terrain_info_t>>
+averageMapFilteringAndcomputeTerrainPlaneInformation(grid_map::GridMap& map,
+ const grid_map::Size& gridMapSize,
+ const double filterRadius,
+ const std::string apply_to_layer,
+ std::string output_layer,
+ const double percentage, // larger, the more be corrected
+ const double nan_value,
+ const pose_t& robot_pose,
+ const double delta_x,
+ const double delta_y,
+ const double num_planes);
+
+std::shared_ptr<std::vector<plane::terrain_info_t>>
+averageMapFilteringAndcomputeTerrainPlaneInformationAndTerrainInformation(
+ grid_map::GridMap& map,
+ const grid_map::Size& gridMapSize,
+ const double filterRadius,
+ const std::string apply_to_layer,
+ std::string output_layer,
+ const double percentage, // larger, the more be corrected
+ const double nan_value,
+ const pose_t& robot_pose,
+ const double delta_x,
+ const double delta_y,
+ const double num_planes);
diff --git a/include/terrain_friction.h b/include/terrain_friction.h
new file mode 100644
index 0000000..851b1ab
--- /dev/null
+++ b/include/terrain_friction.h
@@ -0,0 +1,35 @@
+#ifndef TERRAIN_FRICTION_H
+#define TERRAIN_FRICTION_H
+
+namespace bipedlab
+{
+namespace terrain_friction
+{
+ constexpr float terrain_friction[] = {
+ 1, // 0: road
+ 1, // 1: sidewalk
+ 1, // 2: terrain
+ 1, // 3: bulding
+ 1, // 4: vegetation
+ 1, // 5: walkable
+ };
+
+
+// struct EL_TABLE
+// {
+// constexpr EL_TABLE() : values()
+// {
+// for (auto i = 0; i < 32; ++i) {
+// values[i] = tan(el[i]*M_PI/180);
+// }
+// }
+//
+// int values[32];
+// };
+//
+// constexpr EL_TABLE EL_TAN = EL_TABLE();
+
+} // namespace terrain_friction
+} // namespace BipedLab
+
+#endif
diff --git a/include/utils/line.h b/include/utils/line.h
index e58a0e8..e5298a4 100644
--- a/include/utils/line.h
+++ b/include/utils/line.h
@@ -200,13 +200,7 @@ namespace line
return points;
}
-
-
-
-
-
} /* line */
-
} /* bipedlab */
diff --git a/include/utils/plane.h b/include/utils/plane.h
new file mode 100644
index 0000000..bd1580e
--- /dev/null
+++ b/include/utils/plane.h
@@ -0,0 +1,209 @@
+/* Copyright (C) 2013-2020, The Regents of The University of Michigan.
+ * All rights reserved.
+ * This software was developed in the Biped Lab (https://www.biped.solutions/)
+ * under the direction of Jessy Grizzle, [email protected]. This software may
+ * be available under alternative licensing terms; contact the address above.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * The views and conclusions contained in the software and documentation are those
+ * of the authors and should not be interpreted as representing official policies,
+ * either expressed or implied, of the Regents of The University of Michigan.
+ *
+ * AUTHOR: Bruce JK Huang ([email protected])
+ * WEBSITE: https://www.BrucebotStudio.com/
+ */
+#pragma once
+
+#ifndef PLANE_H
+#define PLANE_H
+
+#include <cmath>
+#include <utility> // pair
+#include <memory> // shared_ptr
+#include <float.h> // FLT_MAX
+#include <eigen3/Eigen/Dense>
+#include <eigen3/Eigen/QR>
+#include "point.h"
+#include "pose.h"
+
+namespace bipedlab
+{
+namespace plane
+{
+ // PLANE REPRESENTATION
+ // normal_vector
+ // \
+ // \
+ // ----------\---------------------
+ // / \ o /
+ // / fixed_point /
+ // / /
+ // / /
+ // / /
+ // ---------------------------------
+ //
+ struct plane_t
+ {
+ // normal vector zof this plane
+ Eigen::Vector3f normal_vector; // x, y, z
+
+ // a point on the plane
+ Eigen::Vector3f fixed_point; // x, y, z
+
+
+ plane_t(const Eigen::Vector3f &normal_vector,
+ const Eigen::Vector3f &fixed_point):
+ normal_vector(normal_vector), fixed_point(fixed_point) { }
+
+ plane_t(const plane_t ©):
+ normal_vector(copy.normal_vector), fixed_point(copy.fixed_point) { }
+
+ plane_t(void):
+ normal_vector(Eigen::Vector3f::Zero(3)),
+ fixed_point(Eigen::Vector3f::Zero(3)) { }
+
+ std::vector<float>
+ getPlaneCoefficients(void)
+ {
+ return std::vector<float>{this->normal_vector(0), this->normal_vector(1),
+ this->normal_vector(2), this->fixed_point(2)};
+ }
+
+ void print(void) {
+ std::cout << "normal_vector: \n" << this->normal_vector << std::endl;
+ std::cout << "fixed_point: \n" << this->fixed_point << std::endl;
+ }
+ EIGEN_MAKE_ALIGNED_OPERATOR_NEW
+ };
+
+
+ typedef struct terrain
+ {
+ double terrain_type;
+ double probability;
+ double friction;
+
+ terrain(void) : terrain_type(-1), probability(-1), friction(-1) { }
+ } terrain_t;
+
+ // TERRAIN PLANE REPRESENTATION
+ // normal_vector
+ // \
+ // \
+ // ----------\--------------------- ^
+ // / \ o / |
+ // / fixed_point / |
+ // / / | length
+ // / / \ / |
+ // / | robot_pose / |
+ // --------------------------------- v
+ //
+ // <------------------------------->
+ // width
+ //
+ //
+ struct terrain_info_t : plane_t
+ {
+ // length of the plane (extending from robot pose toward its heading
+ // direction)
+ double length;
+
+ // width of the plane (extending from robot pose toward perpendicularly
+ // toward it heading directing)
+ double width;
+
+ // robot pose when computing this plane
+ pose_t robot_pose;
+
+ // terrain information
+ terrain_t terrain;
+
+ // points
+ Eigen::MatrixXf points;
+
+ terrain_info_t(const Eigen::Vector3f &normal_vector,
+ const Eigen::Vector3f &fixed_point,
+ const double &length, const double &width,
+ const pose_t &robot_pose):
+ plane_t(normal_vector, fixed_point),
+ length(length), width(width), robot_pose(robot_pose)
+ { }
+
+ terrain_info_t(const plane_t &plane,
+ const double &length, const double &width,
+ const pose_t &robot_pose):
+ plane_t(plane),
+ length(length), width(width), robot_pose(robot_pose)
+ { }
+
+ terrain_info_t(void): plane_t(), length(0), width(0), robot_pose()
+ {
+ // std::cout << "In terrain_plane_t default constructor\n";
+ }
+
+ // terrain_plane_t(const plane_t& copy) {
+ // std::cout << "In terrain_plane_t copy constructor\n";
+ // }
+
+ terrain_info_t& operator=(const plane_t& copy) {
+ this->normal_vector = copy.normal_vector;
+ this->fixed_point = copy.fixed_point;
+ return *this;
+ }
+
+ void print(void) {
+ std::cout << "normal_vector: \n" << this->normal_vector << std::endl;
+ std::cout << "fixed_point: \n" << this->fixed_point << std::endl;
+ std::cout << "(l, w): " << this->length << ", " << this->width << std::endl;
+ std::cout << "robot_pose: "; this->robot_pose.print();
+ }
+
+ EIGEN_MAKE_ALIGNED_OPERATOR_NEW
+ };
+
+
+ // Points should be 3 x m format, where m is the number of points
+ inline
+ std::shared_ptr<plane_t> fitPlaneViaLeastSquares(const Eigen::MatrixXf &points)
+ {
+ // points = [xs
+ // ys
+ // zs]
+ std::shared_ptr<plane_t> fitted_plane(new plane_t);
+ size_t num_points = points.cols();
+ Eigen::MatrixXf A = Eigen::MatrixXf::Ones(num_points, 3); // 1s, xs, ys
+ A.col(1) = points.row(0); // xs
+ A.col(2) = points.row(1); // ys
+ // std::cout << "A: \n" << A << std::endl;
+ Eigen::VectorXf z = points.row(2).transpose().eval(); // zs
+ Eigen::MatrixXf b = A.bdcSvd(Eigen::ComputeThinU |
+ Eigen::ComputeThinV).solve(z);
+ // std::cout << "b: \n" << b << std::endl;
+
+ // b1 * x + b2 * y - z + b0 = 0
+ fitted_plane->normal_vector = Eigen::Vector3f(b(1), b(2), -1);
+ fitted_plane->fixed_point = Eigen::Vector3f(0, 0, b(0));
+
+ return fitted_plane;
+ }
+
+
+
+} /* plane */
+} /* bipedlab */
+#endif /* ifndef PLANE_H */
diff --git a/launch/FRB_test_offline.launch b/launch/FRB_test_offline.launch
index 4acb138..a884e56 100644
--- a/launch/FRB_test_offline.launch
+++ b/launch/FRB_test_offline.launch
@@ -8,6 +8,7 @@
<rosparam file="$(find cassie_planning)/config/communication.yaml" command="load" />
<rosparam file="$(find cassie_planning)/config/cost_map.yaml" command="load" />
<rosparam file="$(find cassie_planning)/config/robot_params.yaml" command="load" />
+ <rosparam file="$(find cassie_planning)/config/plane.yaml" command="load" />
<!-- log commands (saved in ~/.ros folder)-->
diff --git a/launch/FRB_test_online.launch b/launch/FRB_test_online.launch
index 2d4ce1a..a055f98 100644
--- a/launch/FRB_test_online.launch
+++ b/launch/FRB_test_online.launch
@@ -8,6 +8,8 @@
<rosparam file="$(find cassie_planning)/config/communication.yaml" command="load" />
<rosparam file="$(find cassie_planning)/config/cost_map.yaml" command="load" />
<rosparam file="$(find cassie_planning)/config/robot_params.yaml" command="load" />
+ <rosparam file="$(find cassie_planning)/config/plane.yaml" command="load" />
+
<!-- log commands (saved in ~/.ros folder)-->
diff --git a/rviz/FRB_demo.rviz b/rviz/FRB_demo.rviz
new file mode 100644
index 0000000..645b64d
--- /dev/null
+++ b/rviz/FRB_demo.rviz
@@ -0,0 +1,610 @@
+Panels:
+ - Class: rviz/Displays
+ Help Height: 0
+ Name: Displays
+ Property Tree Widget:
+ Expanded:
+ - /Markers1
+ - /Markers1/Namespaces1
+ Splitter Ratio: 0.5497512221336365
+ Tree Height: 1154
+ - Class: rviz/Selection
+ Name: Selection
+ - Class: rviz/Tool Properties
+ Expanded:
+ - /2D Pose Estimate1
+ - /2D Nav Goal1
+ - /Publish Point1
+ Name: Tool Properties
+ Splitter Ratio: 0.5886790156364441
+ - Class: rviz/Views
+ Expanded:
+ - /Current View1
+ Name: Views
+ Splitter Ratio: 0.5
+ - Class: rviz/Time
+ Experimental: false
+ Name: Time
+ SyncMode: 0
+ SyncSource: ""
+ - Class: rviz/Help
+ Name: Help
+Preferences:
+ PromptSaveOnExit: true
+Toolbars:
+ toolButtonStyle: 2
+Visualization Manager:
+ Class: ""
+ Displays:
+ - Alpha: 0.5
+ Cell Size: 1
+ Class: rviz/Grid
+ Color: 160; 160; 164
+ Enabled: true
+ Line Style:
+ Line Width: 0.029999999329447746
+ Value: Lines
+ Name: Grid
+ Normal Cell Count: 0
+ Offset:
+ X: 0
+ Y: 0
+ Z: 0
+ Plane: XY
+ Plane Cell Count: 100
+ Reference Frame: <Fixed Frame>
+ Value: true
+ - Alpha: 1
+ Autocompute Intensity Bounds: true
+ Autocompute Value Bounds:
+ Max Value: 10
+ Min Value: -10
+ Value: true
+ Axis: Z
+ Channel Name: intensity
+ Class: rviz/PointCloud2
+ Color: 255; 255; 255
+ Color Transformer: Intensity
+ Decay Time: 0
+ Enabled: false
+ Invert Rainbow: false
+ Max Color: 255; 255; 255
+ Max Intensity: 13.703908920288086
+ Min Color: 0; 0; 0
+ Min Intensity: 3.788376125157811e-5
+ Name: CostMap
+ Position Transformer: XYZ
+ Queue Size: 10
+ Selectable: true
+ Size (Pixels): 3
+ Size (m): 0.05000000074505806
+ Style: Spheres
+ Topic: /height_point
+ Unreliable: false
+ Use Fixed Frame: true
+ Use rainbow: true
+ Value: false
+ - Class: rviz/Axes
+ Enabled: true
+ Length: 1
+ Name: Axes
+ Radius: 0.10000000149011612
+ Reference Frame: <Fixed Frame>
+ Value: true
+ - Class: rviz/MarkerArray
+ Enabled: true
+ Marker Topic: /planner/MarkerArray
+ Name: Markers
+ Namespaces:
+ dir_for_robot (b): false
+ goal_for_robot (c): false
+ goal_searching: false
+ goal_searching_segments-0: true
+ goal_searching_segments-1: true
+ robot_pose: false
+ rrt_goal: false
+ rrt_samples: false
+ rrt_start: true
+ rrt_waypoints: true
+ selected_searching_goal: true
+ Queue Size: 100
+ Value: true
+ - Alpha: 0.5
+ Autocompute Intensity Bounds: true
+ Class: grid_map_rviz_plugin/GridMap
+ Color: 200; 200; 200
+ Color Layer: elevation_map
+ Color Transformer: GridMapLayer
+ Enabled: true
+ Height Layer: elevation_map
+ Height Transformer: Layer
+ History Length: 1
+ Invert Rainbow: false
+ Max Color: 255; 255; 255
+ Max Intensity: 10
+ Min Color: 0; 0; 0
+ Min Intensity: 0
+ Name: WorldElevation
+ Show Grid Lines: true
+ Topic: /planner/world_map
+ Unreliable: false
+ Use Rainbow: true
+ Value: true
+ - Alpha: 0.20000000298023224
+ Autocompute Intensity Bounds: false
+ Class: grid_map_rviz_plugin/GridMap
+ Color: 200; 200; 200
+ Color Layer: traversability_map
+ Color Transformer: GridMapLayer
+ Enabled: false
+ Height Layer: traversability_map
+ Height Transformer: Layer
+ History Length: 1
+ Invert Rainbow: false
+ Max Color: 0; 0; 0
+ Max Intensity: 1
+ Min Color: 255; 255; 255
+ Min Intensity: 0
+ Name: WorldTraversability
+ Show Grid Lines: true
+ Topic: /planner/world_map
+ Unreliable: false
+ Use Rainbow: false
+ Value: false
+ - Alpha: 0.699999988079071
+ Autocompute Intensity Bounds: true
+ Class: grid_map_rviz_plugin/GridMap
+ Color: 200; 200; 200
+ Color Layer: elevation_map
+ Color Transformer: GridMapLayer
+ Enabled: false
+ Height Layer: elevation_map
+ Height Transformer: Layer
+ History Length: 1
+ Invert Rainbow: false
+ Max Color: 255; 255; 255
+ Max Intensity: 10
+ Min Color: 0; 0; 0
+ Min Intensity: 0
+ Name: LocalElevation
+ Show Grid Lines: true
+ Topic: /planner/local_map
+ Unreliable: false
+ Use Rainbow: true
+ Value: false
+ - Alpha: 0.8999999761581421
+ Autocompute Intensity Bounds: true
+ Class: grid_map_rviz_plugin/GridMap
+ Color: 200; 200; 200
+ Color Layer: filtered_elevation_map
+ Color Transformer: GridMapLayer
+ Enabled: false
+ Height Layer: filtered_elevation_map
+ Height Transformer: GridMapLayer
+ History Length: 1
+ Invert Rainbow: false
+ Max Color: 255; 255; 255
+ Max Intensity: 10
+ Min Color: 0; 0; 0
+ Min Intensity: 0
+ Name: LocalMapFiltered
+ Show Grid Lines: true
+ Topic: /planner/local_map
+ Unreliable: false
+ Use Rainbow: true
+ Value: false
+ - Alpha: 0.699999988079071
+ Autocompute Intensity Bounds: true
+ Class: grid_map_rviz_plugin/GridMap
+ Color: 200; 200; 200
+ Color Layer: filtered_slope
+ Color Transformer: GridMapLayer
+ Enabled: false
+ Height Layer: filtered_slope
+ Height Transformer: ""
+ History Length: 1
+ Invert Rainbow: false
+ Max Color: 255; 255; 255
+ Max Intensity: 10
+ Min Color: 0; 0; 0
+ Min Intensity: 0
+ Name: LocalSlope
+ Show Grid Lines: true
+ Topic: /planner/local_map
+ Unreliable: false
+ Use Rainbow: true
+ Value: false
+ - Alpha: 1
+ Autocompute Intensity Bounds: false
+ Class: grid_map_rviz_plugin/GridMap
+ Color: 200; 200; 200
+ Color Layer: occupancy_map
+ Color Transformer: IntensityLayer
+ Enabled: false
+ Height Layer: occupancy_map
+ Height Transformer: Layer
+ History Length: 1
+ Invert Rainbow: false
+ Max Color: 0; 0; 0
+ Max Intensity: 1
+ Min Color: 255; 255; 255
+ Min Intensity: 0
+ Name: LocalOccup
+ Show Grid Lines: true
+ Topic: /planner/local_map
+ Unreliable: false
+ Use Rainbow: false
+ Value: false
+ - Alpha: 1
+ Autocompute Intensity Bounds: true
+ Autocompute Value Bounds:
+ Max Value: 10
+ Min Value: -10
+ Value: true
+ Axis: Z
+ Channel Name: intensity
+ Class: rviz/PointCloud2
+ Color: 255; 255; 255
+ Color Transformer: Intensity
+ Decay Time: 0
+ Enabled: false
+ Invert Rainbow: false
+ Max Color: 255; 255; 255
+ Max Intensity: 0
+ Min Color: 0; 0; 0
+ Min Intensity: 0
+ Name: PlannerPathPoints
+ Position Transformer: XYZ
+ Queue Size: 10
+ Selectable: true
+ Size (Pixels): 3
+ Size (m): 0.20000000298023224
+ Style: Flat Squares
+ Topic: /planner/planner_path_points
+ Unreliable: false
+ Use Fixed Frame: true
+ Use rainbow: true
+ Value: false
+ - Alpha: 1
+ Autocompute Intensity Bounds: false
+ Autocompute Value Bounds:
+ Max Value: 10
+ Min Value: -10
+ Value: true
+ Axis: Z
+ Channel Name: intensity
+ Class: rviz/PointCloud2
+ Color: 255; 255; 255
+ Color Transformer: Intensity
+ Decay Time: 0
+ Enabled: false
+ Invert Rainbow: false
+ Max Color: 255; 255; 255
+ Max Intensity: 1
+ Min Color: 0; 0; 0
+ Min Intensity: 1
+ Name: RRTPathPoints
+ Position Transformer: XYZ
+ Queue Size: 10
+ Selectable: true
+ Size (Pixels): 5
+ Size (m): 0.10000000149011612
+ Style: Points
+ Topic: /planner/rrt_path_points
+ Unreliable: false
+ Use Fixed Frame: true
+ Use rainbow: false
+ Value: false
+ - Alpha: 1
+ Autocompute Intensity Bounds: true
+ Class: grid_map_rviz_plugin/GridMap
+ Color: 200; 200; 200
+ Color Layer: elevation_map
+ Color Transformer: IntensityLayer
+ Enabled: false
+ Height Layer: elevation_map
+ Height Transformer: ""
+ History Length: 1
+ Invert Rainbow: false
+ Max Color: 255; 255; 255
+ Max Intensity: 10
+ Min Color: 0; 0; 0
+ Min Intensity: 0
+ Name: MapPublisherEle
+ Show Grid Lines: true
+ Topic: /fake_map_publisher/multi_layer_map
+ Unreliable: false
+ Use Rainbow: true
+ Value: false
+ - Alpha: 1
+ Autocompute Intensity Bounds: true
+ Class: grid_map_rviz_plugin/GridMap
+ Color: 200; 200; 200
+ Color Layer: filtered_elevation_map
+ Color Transformer: GridMapLayer
+ Enabled: false
+ Height Layer: filtered_elevation_map
+ Height Transformer: ""
+ History Length: 1
+ Invert Rainbow: false
+ Max Color: 255; 255; 255
+ Max Intensity: 10
+ Min Color: 0; 0; 0
+ Min Intensity: 0
+ Name: MapPublisherFiltered
+ Show Grid Lines: true
+ Topic: /fake_map_publisher/multi_layer_map
+ Unreliable: false
+ Use Rainbow: true
+ Value: false
+ - Alpha: 1
+ Autocompute Intensity Bounds: true
+ Class: grid_map_rviz_plugin/GridMap
+ Color: 200; 200; 200
+ Color Layer: traversability_map
+ Color Transformer: IntensityLayer
+ Enabled: false
+ Height Layer: traversability_map
+ Height Transformer: ""
+ History Length: 1
+ Invert Rainbow: false
+ Max Color: 255; 255; 255
+ Max Intensity: 10
+ Min Color: 0; 0; 0
+ Min Intensity: 0
+ Name: MapPublisherTrav
+ Show Grid Lines: true
+ Topic: /fake_map_publisher/multi_layer_map
+ Unreliable: false
+ Use Rainbow: false
+ Value: false
+ - Alpha: 1
+ Buffer Length: 1
+ Class: rviz/Path
+ Color: 255; 0; 0
+ Enabled: true
+ Head Diameter: 0.30000001192092896
+ Head Length: 0.20000000298023224
+ Length: 0.30000001192092896
+ Line Style: Lines
+ Line Width: 0.029999999329447746
+ Name: Path
+ Offset:
+ X: 0
+ Y: 0
+ Z: 0
+ Pose Color: 0; 255; 0
+ Pose Style: Arrows
+ Radius: 0.029999999329447746
+ Shaft Diameter: 0.20000000298023224
+ Shaft Length: 0.10000000149011612
+ Topic: /planner/robot_trajectory
+ Unreliable: false
+ Value: true
+ - Class: rviz/MarkerArray
+ Enabled: false
+ Marker Topic: /fake_robot_publisher/fake_robot
+ Name: FakeRobot
+ Namespaces:
+ {}
+ Queue Size: 100
+ Value: false
+ - Alpha: 0.30000001192092896
+ Autocompute Intensity Bounds: false
+ Class: grid_map_rviz_plugin/GridMap
+ Color: 200; 200; 200
+ Color Layer: elevation_map