Skip to content

Commit 3e9c467

Browse files
committed
monoforce demo: publishing real path from dataset as well
1 parent b6c5dd8 commit 3e9c467

File tree

2 files changed

+51
-5
lines changed

2 files changed

+51
-5
lines changed

config/rviz/monoforce2.rviz

+44-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Panels:
66
Expanded:
77
- /Global Options1
88
Splitter Ratio: 0.5
9-
Tree Height: 555
9+
Tree Height: 179
1010
- Class: rviz/Selection
1111
Name: Selection
1212
- Class: rviz/Tool Properties
@@ -76,7 +76,7 @@ Visualization Manager:
7676
Head Length: 0.03999999910593033
7777
Length: 0.30000001192092896
7878
Line Style: Billboards
79-
Line Width: 0.10000000149011612
79+
Line Width: 0.029999999329447746
8080
Name: Path
8181
Offset:
8282
X: 0
@@ -91,6 +91,30 @@ Visualization Manager:
9191
Topic: /path
9292
Unreliable: false
9393
Value: true
94+
- Alpha: 1
95+
Buffer Length: 1
96+
Class: rviz/Path
97+
Color: 252; 233; 79
98+
Enabled: true
99+
Head Diameter: 0.07999999821186066
100+
Head Length: 0.03999999910593033
101+
Length: 0.30000001192092896
102+
Line Style: Billboards
103+
Line Width: 0.029999999329447746
104+
Name: Path GT
105+
Offset:
106+
X: 0
107+
Y: 0
108+
Z: 0
109+
Pose Color: 255; 85; 255
110+
Pose Style: None
111+
Queue Size: 10
112+
Radius: 0.029999999329447746
113+
Shaft Diameter: 0.019999999552965164
114+
Shaft Length: 0.10000000149011612
115+
Topic: /path_gt
116+
Unreliable: false
117+
Value: true
94118
- Alpha: 0.30000001192092896
95119
Autocompute Intensity Bounds: false
96120
Class: grid_map_rviz_plugin/GridMap
@@ -445,6 +469,7 @@ Visualization Manager:
445469
CameraInfo Rear: true
446470
CameraInfo Right: true
447471
Cloud: true
472+
Forces: true
448473
Grid: true
449474
GridMap Lidar: true
450475
GridMap Pred Diff: true
@@ -456,6 +481,7 @@ Visualization Manager:
456481
Image Rear: true
457482
Image Right: true
458483
Path: true
484+
Path GT: true
459485
RobotModel: true
460486
TF: true
461487
Value: true
@@ -471,6 +497,7 @@ Visualization Manager:
471497
Unreliable: false
472498
Value: false
473499
Visibility:
500+
"": true
474501
Camera Front: true
475502
Camera Rear: true
476503
Camera Right: true
@@ -490,6 +517,7 @@ Visualization Manager:
490517
Image Rear: true
491518
Image Right: true
492519
Path: true
520+
Path GT: true
493521
RobotModel: true
494522
TF: true
495523
Value: true
@@ -505,6 +533,7 @@ Visualization Manager:
505533
Unreliable: false
506534
Value: false
507535
Visibility:
536+
"": true
508537
Camera Front: true
509538
Camera Left: true
510539
Camera Right: true
@@ -524,6 +553,7 @@ Visualization Manager:
524553
Image Rear: true
525554
Image Right: true
526555
Path: true
556+
Path GT: true
527557
RobotModel: true
528558
TF: true
529559
Value: true
@@ -539,6 +569,7 @@ Visualization Manager:
539569
Unreliable: false
540570
Value: false
541571
Visibility:
572+
"": true
542573
Camera Front: true
543574
Camera Left: true
544575
Camera Rear: true
@@ -558,10 +589,19 @@ Visualization Manager:
558589
Image Rear: true
559590
Image Right: true
560591
Path: true
592+
Path GT: true
561593
RobotModel: true
562594
TF: true
563595
Value: true
564596
Zoom Factor: 1
597+
- Class: rviz/MarkerArray
598+
Enabled: true
599+
Marker Topic: /forces
600+
Name: Forces
601+
Namespaces:
602+
"": true
603+
Queue Size: 100
604+
Value: true
565605
Enabled: true
566606
Global Options:
567607
Background Color: 238; 238; 236
@@ -652,7 +692,7 @@ Window Geometry:
652692
collapsed: false
653693
Image Right:
654694
collapsed: false
655-
QMainWindow State: 000000ff00000000fd0000000400000000000002da000001adfc0200000008fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000005c00fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afc00000180000001ad0000000000fffffffaffffffff0100000003fb000000160049006d006100670065002000460072006f006e00740000000000ffffffff0000008700fffffffb0000000a005600690065007700730000000000ffffffff0000010000fffffffb000000100044006900730070006c0061007900730000000000000001790000015600fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261000000010000010f0000035afc0200000002fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000001200530065006c0065006300740069006f006e010000025a000000b2000000000000000000000002000002ab000001b6fc0100000005fb0000001800430061006d006500720061002000460072006f006e00740100000000000002ab0000009100fffffffc00000000000001ce0000000000fffffffaffffffff0200000002fb0000001600430061006d0065007200610020004c0065006600740000000000ffffffff0000001600fffffffb000000140049006d0061006700650020004c0065006600740000000016000001060000001600fffffffc000002730000026c0000000000fffffffaffffffff0200000002fb0000001600430061006d006500720061002000520065006100720000000000ffffffff0000001600fffffffb000000140049006d006100670065002000520065006100720000000016000001060000001600fffffffc000003b3000003850000000000fffffffaffffffff0200000002fb0000001800430061006d0065007200610020005200690067006800740000000000ffffffff0000001600fffffffb000000160049006d0061006700650020005200690067006800740000000016000001060000001600fffffffb0000000a00560069006500770073030000004e00000080000002e10000019700000003000007380000003efc0100000002fb0000000800540069006d00650000000000000007380000041800fffffffb0000000800540069006d00650100000000000004500000000000000000000002ab0000015b00000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730000000000ffffffff0000000000000000
695+
QMainWindow State: 000000ff00000000fd0000000400000000000002850000015bfc0200000008fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000005c00fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afc000001d20000015b0000000000fffffffaffffffff0100000003fb000000160049006d006100670065002000460072006f006e00740000000000ffffffff0000008700fffffffb0000000a005600690065007700730000000000ffffffff0000010000fffffffb000000100044006900730070006c0061007900730000000000000001790000015600fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261000000010000010f0000035afc0200000002fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000001200530065006c0065006300740069006f006e010000025a000000b2000000000000000000000002000002ab000001b6fc0100000005fb0000001800430061006d006500720061002000460072006f006e00740100000000000002ab0000009100fffffffc00000000000001ce0000000000fffffffaffffffff0200000002fb0000001600430061006d0065007200610020004c0065006600740000000000ffffffff0000001600fffffffb000000140049006d0061006700650020004c0065006600740000000016000001060000001600fffffffc000002730000026c0000000000fffffffaffffffff0200000002fb0000001600430061006d006500720061002000520065006100720000000000ffffffff0000001600fffffffb000000140049006d006100670065002000520065006100720000000016000001060000001600fffffffc000003b3000003850000000000fffffffaffffffff0200000002fb0000001800430061006d0065007200610020005200690067006800740000000000ffffffff0000001600fffffffb000000160049006d0061006700650020005200690067006800740000000016000001060000001600fffffffb0000000a00560069006500770073030000004e00000080000002e10000019700000003000007380000003efc0100000002fb0000000800540069006d00650000000000000007380000041800fffffffb0000000800540069006d00650100000000000004500000000000000000000002ab0000015b00000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730000000000ffffffff0000000000000000
656696
Selection:
657697
collapsed: false
658698
Time:
@@ -663,4 +703,4 @@ Window Geometry:
663703
collapsed: true
664704
Width: 683
665705
X: 543
666-
Y: 124
706+
Y: 87

nodes/monoforce

+7-1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ class DataVis:
5858
self.gm_diff_pub = rospy.Publisher('grid_map_diff', GridMap, queue_size=1)
5959
self.cloud_pub = rospy.Publisher('cloud', PointCloud2, queue_size=1)
6060
self.path_pub = rospy.Publisher('path', Path, queue_size=1)
61+
self.path_gt_pub = rospy.Publisher('path_gt', Path, queue_size=1)
6162
self.img_pubs = [rospy.Publisher('%s/image' % cam, Image, queue_size=1) for cam in self.camera_frames]
6263
self.caminfo_pubs = [rospy.Publisher('%s/camera_info' % cam, CameraInfo, queue_size=1) for cam in self.camera_frames]
6364
self.tf_broadcast = tf2_ros.TransformBroadcaster()
@@ -249,6 +250,9 @@ class DataVis:
249250
imgs, rots, trans, intrins, post_rots, post_trans, hm_lidar, hm_traj, map_pose, lidar_pts = ds[sample_i]
250251
points = lidar_pts.numpy().T
251252

253+
traj = ds.get_traj(sample_i)
254+
poses_gt = traj['poses']
255+
252256
imgs_raw = []
253257
Ks = []
254258
for cam in self.camera_frames:
@@ -305,9 +309,11 @@ class DataVis:
305309
rospy.loginfo('Predicted forces shape: %s' % str(forces.shape))
306310
robot_points = robot_points.cpu().numpy()
307311
rospy.loginfo('Robot contact points shape: %s' % str(robot_points.shape))
308-
# publish path
312+
# publish paths
309313
path_msg = to_path(poses, frame_id=self.robot_initial_frame, stamp=stamp)
314+
path_gt_msg = to_path(poses_gt, frame_id=self.robot_initial_frame, stamp=stamp)
310315
self.path_pub.publish(path_msg)
316+
self.path_gt_pub.publish(path_gt_msg)
311317

312318
# robot pose in map frame
313319
tf = to_tf(map_pose, self.map_frame, self.robot_initial_frame, stamp)

0 commit comments

Comments
 (0)