Skip to content

Commit

Permalink
Fix use of mrpt bridge to publish XYZIRT point clouds too for ROS 1
Browse files Browse the repository at this point in the history
  • Loading branch information
jlblancoc committed Mar 3, 2024
1 parent 3db80b0 commit 4607aa4
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 35 deletions.
12 changes: 6 additions & 6 deletions mvsim_node_src/mvsim_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ using Msg_TransformStamped = geometry_msgs::TransformStamped;
#include <tf2_geometry_msgs/tf2_geometry_msgs.h>
#endif

// usings:
using Msg_OccupancyGrid = nav_msgs::msg::OccupancyGrid;
using Msg_MapMetaData = nav_msgs::msg::MapMetaData;
using Msg_TransformStamped = geometry_msgs::msg::TransformStamped;
#endif

#if MRPT_VERSION >= 0x020b04 // >=2.11.4?
#define HAVE_POINTS_XYZIRT
#endif
Expand All @@ -76,12 +82,6 @@ using Msg_TransformStamped = geometry_msgs::TransformStamped;
#include <mrpt/maps/CPointsMapXYZIRT.h>
#endif

// usings:
using Msg_OccupancyGrid = nav_msgs::msg::OccupancyGrid;
using Msg_MapMetaData = nav_msgs::msg::MapMetaData;
using Msg_TransformStamped = geometry_msgs::msg::TransformStamped;
#endif

#include <iostream>
#include <rapidxml_utils.hpp>

Expand Down
54 changes: 25 additions & 29 deletions mvsim_tutorial/demo_warehouse_ros1.rviz
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ Panels:
- /Status1
- /TF1/Frames1
- /TF1/Tree1
- /Image1
Splitter Ratio: 0.6176469922065735
Tree Height: 274
- Class: rviz/Selection
Expand All @@ -28,7 +27,7 @@ Panels:
- Class: rviz/Time
Name: Time
SyncMode: 0
SyncSource: PointCloud2
SyncSource: Raw Lidar Points
- Class: rviz_plugin_tutorials/Teleop
Name: Teleop
Topic: /cmd_vel
Expand Down Expand Up @@ -78,27 +77,24 @@ Visualization Manager:
Value: true
scanner1:
Value: true
world:
Value: true
Marker Alpha: 1
Marker Scale: 0.4000000059604645
Name: TF
Show Arrows: true
Show Axes: true
Show Names: true
Tree:
world:
map:
odom:
base_link:
base_footprint:
{}
cam1:
{}
lidar1_points:
{}
scanner1:
{}
map:
odom:
base_link:
base_footprint:
{}
cam1:
{}
lidar1_points:
{}
scanner1:
{}
Update Interval: 0
Value: true
- Class: rviz/MarkerArray
Expand Down Expand Up @@ -155,7 +151,7 @@ Visualization Manager:
Min Value: -10
Value: true
Axis: Z
Channel Name: intensity
Channel Name: ring
Class: rviz/PointCloud2
Color: 255; 255; 255
Color Transformer: Intensity
Expand All @@ -164,12 +160,12 @@ Visualization Manager:
Invert Rainbow: false
Max Color: 255; 255; 255
Min Color: 0; 0; 0
Name: PointCloud2
Name: Raw Lidar Points
Position Transformer: XYZ
Queue Size: 10
Selectable: true
Size (Pixels): 3
Size (m): 0.009999999776482582
Size (m): 0.029999999329447746
Style: Flat Squares
Topic: /lidar1_points
Unreliable: false
Expand All @@ -182,7 +178,7 @@ Visualization Manager:
Max Value: 1
Median window: 5
Min Value: 0
Name: Image
Name: Camera
Normalize Range: true
Queue Size: 2
Transport Hint: raw
Expand Down Expand Up @@ -216,7 +212,7 @@ Visualization Manager:
Views:
Current:
Class: rviz/Orbit
Distance: 16.860950469970703
Distance: 16.988401412963867
Enable Stereo Rendering:
Stereo Eye Separation: 0.05999999865889549
Stereo Focal Distance: 1
Expand All @@ -232,19 +228,19 @@ Visualization Manager:
Invert Z Axis: false
Name: Current View
Near Clip Distance: 0.009999999776482582
Pitch: 0.6547970771789551
Pitch: 0.5597972273826599
Target Frame: <Fixed Frame>
Yaw: 2.675391912460327
Yaw: 2.6403937339782715
Saved: ~
Window Geometry:
Camera:
collapsed: false
Displays:
collapsed: false
Height: 876
Hide Left Dock: false
Hide Right Dock: true
Image:
collapsed: false
QMainWindow State: 000000ff00000000fd000000040000000000000178000002cefc020000000cfb0000001200530065006c0065006300740069006f006e00000001e10000009b0000005c00fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073010000003d0000014f000000c900fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261fb0000000c00540065006c0065006f00700100000192000000ee0000004700fffffffb0000000c00540065006c0065006f00700000000260000000aa0000000000000000fb0000000c00540065006c0065006f0070010000020f000000fb0000000000000000fb0000000a0049006d0061006700650100000286000000850000001600ffffff000000010000010f000002e2fc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a005600690065007700730000000028000002e2000000a400fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000005ff0000003efc0100000002fb0000000800540069006d00650100000000000005ff000003cc00fffffffb0000000800540069006d0065010000000000000450000000000000000000000481000002ce00000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000
QMainWindow State: 000000ff00000000fd000000040000000000000178000002cefc020000000cfb0000001200530065006c0065006300740069006f006e00000001e10000009b0000005c00fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001fb00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073010000003d0000014f000000c900fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261fb0000000c00540065006c0065006f00700100000192000000ee0000004700fffffffb0000000c00540065006c0065006f00700000000260000000aa0000000000000000fb0000000c00540065006c0065006f0070010000020f000000fb0000000000000000fb0000000c00430061006d0065007200610100000286000000850000001600ffffff000000010000010f000002e2fc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a005600690065007700730000000028000002e2000000a400fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000004380000003efc0100000002fb0000000800540069006d0065010000000000000438000003cc00fffffffb0000000800540069006d00650100000000000004500000000000000000000002ba000002ce00000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000
Selection:
collapsed: false
Teleop:
Expand All @@ -255,6 +251,6 @@ Window Geometry:
collapsed: false
Views:
collapsed: true
Width: 1535
X: 1990
Y: 27
Width: 1080
X: 1920
Y: 0

0 comments on commit 4607aa4

Please sign in to comment.