Skip to content

Commit

Permalink
Updated Spectacular AI ROS version to v0.0.2. Updated rviz example. U…
Browse files Browse the repository at this point in the history
…pdated spectacularai launch configuration
  • Loading branch information
Bercon committed Oct 26, 2023
1 parent f4d4bcf commit 110df01
Show file tree
Hide file tree
Showing 3 changed files with 110 additions and 84 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ARG SIM=0
ARG CORE_NUM=1
ARG BUILD_TYPE="RelWithDebInfo"
ARG INCLUDE_SPECTACULARAI_ROS=NO
ARG SPECTACULARAI_ROS_VERSION=v0.0.1
ARG SPECTACULARAI_ROS_VERSION=v0.0.2

ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
Expand Down
162 changes: 94 additions & 68 deletions rae_camera/config/spectacular.rviz
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ Panels:
Expanded:
- /Global Options1
- /Status1
- /Odometry1
- /Odometry1/Shape1
- /Odometry1/Covariance1
- /PointCloud21
- /Map1
Splitter Ratio: 0.5
Tree Height: 625
- /TF1
- /TF1/Frames1
- /TF1/Tree1
Splitter Ratio: 0.8294117450714111
Tree Height: 1063
- Class: rviz_common/Selection
Name: Selection
- Class: rviz_common/Tool Properties
Expand All @@ -30,7 +30,7 @@ Panels:
Experimental: false
Name: Time
SyncMode: 0
SyncSource: ""
SyncSource: PointCloud2
Visualization Manager:
Class: ""
Displays:
Expand All @@ -52,47 +52,8 @@ Visualization Manager:
Plane Cell Count: 10
Reference Frame: <Fixed Frame>
Value: true
- Angle Tolerance: 0.10000000149011612
Class: rviz_default_plugins/Odometry
Covariance:
Orientation:
Alpha: 0.5
Color: 255; 255; 127
Color Style: Unique
Frame: Local
Offset: 1
Scale: 1
Value: true
Position:
Alpha: 0.30000001192092896
Color: 204; 51; 204
Scale: 1
Value: true
Value: true
Enabled: true
Keep: 100
Name: Odometry
Position Tolerance: 0.10000000149011612
Shape:
Alpha: 1
Axes Length: 0.20000000298023224
Axes Radius: 0.019999999552965164
Color: 255; 25; 0
Head Length: 0.30000001192092896
Head Radius: 0.10000000149011612
Shaft Length: 1
Shaft Radius: 0.05000000074505806
Value: Axes
Topic:
Depth: 5
Durability Policy: Volatile
Filter size: 10
History Policy: Keep Last
Reliability Policy: Reliable
Value: /output/odometry
Value: true
- Class: rviz_default_plugins/Image
Enabled: false
Enabled: true
Max Value: 1
Median window: 5
Min Value: 0
Expand All @@ -104,7 +65,7 @@ Visualization Manager:
History Policy: Keep Last
Reliability Policy: Reliable
Value: /left/image_rect
Value: false
Value: true
- Alpha: 1
Autocompute Intensity Bounds: true
Autocompute Value Bounds:
Expand Down Expand Up @@ -160,24 +121,89 @@ Visualization Manager:
Value: /output/occupancyGrid_updates
Use Timestamp: false
Value: true
- Class: rviz_default_plugins/Image
- Class: rviz_default_plugins/TF
Enabled: true
Max Value: 1
Median window: 5
Min Value: 0
Name: Image
Normalize Range: true
Topic:
Depth: 5
Durability Policy: Volatile
History Policy: Keep Last
Reliability Policy: Reliable
Value: /overlay
Frame Timeout: 15
Frames:
All Enabled: false
base_footprint:
Value: false
base_link:
Value: false
base_link_back:
Value: false
chassis:
Value: false
left_caster_wheel:
Value: false
map:
Value: true
odom:
Value: true
rae_imu_frame:
Value: true
rae_left_back_camera_frame:
Value: false
rae_left_back_camera_optical_frame:
Value: true
rae_left_camera_frame:
Value: false
rae_left_camera_optical_frame:
Value: true
rae_rgb_camera_frame:
Value: false
rae_rgb_camera_optical_frame:
Value: true
rae_right_back_camera_frame:
Value: false
rae_right_back_camera_optical_frame:
Value: true
rae_right_camera_frame:
Value: false
rae_right_camera_optical_frame:
Value: true
right_caster_wheel:
Value: false
Marker Scale: 0.30000001192092896
Name: TF
Show Arrows: true
Show Axes: true
Show Names: false
Tree:
map:
odom:
base_footprint:
base_link:
base_link_back:
{}
chassis:
rae_left_back_camera_frame:
rae_left_back_camera_optical_frame:
{}
rae_left_camera_frame:
rae_left_camera_optical_frame:
{}
rae_rgb_camera_frame:
rae_rgb_camera_optical_frame:
{}
rae_right_back_camera_frame:
rae_right_back_camera_optical_frame:
{}
rae_right_camera_frame:
rae_right_camera_optical_frame:
{}
left_caster_wheel:
{}
rae_imu_frame:
{}
right_caster_wheel:
{}
Update Interval: 0
Value: true
Enabled: true
Global Options:
Background Color: 48; 48; 48
Fixed Frame: world
Fixed Frame: map
Frame Rate: 30
Name: root
Tools:
Expand Down Expand Up @@ -220,7 +246,7 @@ Visualization Manager:
Views:
Current:
Class: rviz_default_plugins/Orbit
Distance: 4.2609357833862305
Distance: 2.697260856628418
Enable Stereo Rendering:
Stereo Eye Separation: 0.05999999865889549
Stereo Focal Distance: 1
Expand All @@ -235,20 +261,20 @@ Visualization Manager:
Invert Z Axis: false
Name: Current View
Near Clip Distance: 0.009999999776482582
Pitch: 0.7647970914840698
Pitch: 0.3197977542877197
Target Frame: <Fixed Frame>
Value: Orbit (rviz)
Yaw: 3.2903988361358643
Yaw: 0.6372156739234924
Saved: ~
Window Geometry:
Displays:
collapsed: false
Height: 1127
Height: 1598
Hide Left Dock: false
Hide Right Dock: false
Image:
collapsed: false
QMainWindow State: 000000ff00000000fd000000040000000000000156000003cdfc020000000bfb0000001200530065006c0065006300740069006f006e00000001e10000009b0000005c00fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073010000003b000002fa000000c700fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261fb0000000a0049006d00610067006500000004a8000000f50000002800fffffffb0000000a0049006d006100670065010000036d0000009b0000000000000000fb0000000a0049006d006100670065010000033b000000cd0000002800ffffff000000010000010f000003cdfc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a00560069006500770073010000003b000003cd000000a000fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000007800000003efc0100000002fb0000000800540069006d00650100000000000007800000025300fffffffb0000000800540069006d006501000000000000045000000000000000000000050f000003cd00000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000
QMainWindow State: 000000ff00000000fd000000040000000000000265000005a0fc020000000bfb0000001200530065006c0065006300740069006f006e00000001e10000009b0000005c00fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073010000003d000004b2000000c900fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261fb0000000a0049006d00610067006500000004a8000000f50000000000000000fb0000000a0049006d00610067006501000004f5000000e80000002800fffffffb0000000a0049006d006100670065010000033b000000cd0000000000000000000000010000010f000005a0fc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a00560069006500770073010000003d000005a0000000a400fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000008f10000003efc0100000002fb0000000800540069006d00650100000000000008f1000002fb00fffffffb0000000800540069006d0065010000000000000450000000000000000000000571000005a000000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000
Selection:
collapsed: false
Time:
Expand All @@ -257,6 +283,6 @@ Window Geometry:
collapsed: false
Views:
collapsed: false
Width: 1920
X: 0
Y: 0
Width: 2289
X: 3437
Y: 191
30 changes: 15 additions & 15 deletions rae_camera/launch/spectacular.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,22 @@


def launch_setup(context, *args, **kwargs):

params_file = LaunchConfiguration("params_file")
name = LaunchConfiguration('name').perform(context)
return [
Node(
condition=IfCondition(LaunchConfiguration("use_rviz").perform(context)),
package="rviz2",
executable="rviz2",
name="rviz2",
output="log",
arguments=["-d", LaunchConfiguration("rviz_config")],
),
Node(
condition=IfCondition(LaunchConfiguration("use_rviz").perform(context)),
package="rviz2",
executable="rviz2",
name="rviz2",
output="log",
arguments=["-d", LaunchConfiguration("rviz_config")],
),
IncludeLaunchDescription(
PythonLaunchDescriptionSource(
os.path.join(get_package_share_directory('rae_description'), 'launch', 'rsp.launch.py')),
launch_arguments={'sim': 'false'}.items()
),

ComposableNodeContainer(
name=name+"_container",
namespace="",
Expand All @@ -52,15 +50,18 @@ def launch_setup(context, *args, **kwargs):
package='spectacularai_ros2',
plugin='spectacularAI::ros2::Node',
parameters=[
{"imu_frame_id": "base_footprint"},
{"world_frame_id": "world"},
{"cam0_frame_id": name+"_left_camera_optical_frame"},
{"cam1_frame_id": name+"_right_camera_optical_frame"},
# Camera extrinsics
{"cam0_optical_frame_id": name + "_right_camera_optical_frame"},
{"cam1_optical_frame_id": name + "_left_camera_optical_frame"},
{"base_link_frame_id": LaunchConfiguration('parent_frame').perform(context)},
{"depth_scale": 1.0/1000.0}, # Depth map values are multiplied with this to get distance in meters
{"camera_input_type": "stereo_depth_features"},
{"recording_folder": LaunchConfiguration('recording_folder').perform(context)},
{"enable_mapping": True},
{"enable_occupancy_grid": True},
{"output_on_imu_samples": True},
{"separate_odom_tf": True},
{"device_model": "RAE"} # Use stored imuToCamera from spectacularai_ros project
],
remappings=[
('input/imu', name + '/imu/data'),
Expand All @@ -80,7 +81,6 @@ def launch_setup(context, *args, **kwargs):


def generate_launch_description():
spectacular_prefix = get_package_share_directory("spectacularai_ros2")
rae_camera_prefix = get_package_share_directory("rae_camera")
declared_arguments = [
DeclareLaunchArgument("name", default_value="rae"),
Expand Down

0 comments on commit 110df01

Please sign in to comment.