Skip to content

Commit

Permalink
update docker and launch files
Browse files Browse the repository at this point in the history
  • Loading branch information
Serafadam committed Oct 12, 2023
1 parent d14ca9d commit 57288c0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ RUN --mount=type=secret,id=SPECTACULAR_AI_TOKEN if [ "$INCLUDE_SPECTACULARAI_ROS
&& ROS_DISTRO=$ROS_DISTRO DEPTHAI_WS=$UNDERLAY_WS GITHUB_RAE_PAT_TOKEN=$(cat /run/secrets/SPECTACULAR_AI_TOKEN) . ./scripts/download_and_build_static.sh \
&& apt-get -y remove unzip \
&& echo "if [ -f $(pwd)/spectacularai_ros2/install/setup.bash ]; then source $(pwd)/spectacularai_ros2/install/setup.bash; fi" >> $HOME/.bashrc; \
&& echo "if [ -f $(pwd)/spectacularai_ros2/install/setup.bash ]; then source $(pwd)/spectacularai_ros2/install/setup.bash; fi" >> $HOME/.zshrc; \
fi

ENTRYPOINT [ "/ws/src/rae-ros/entrypoint.sh" ]
Expand Down
18 changes: 7 additions & 11 deletions rae_camera/launch/spectacular.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ def launch_setup(context, *args, **kwargs):

params_file = LaunchConfiguration("params_file")
name = LaunchConfiguration('name').perform(context)
parent_frame = LaunchConfiguration('parent_frame', default = 'oak-d-base-frame')
urdf_launch_dir = os.path.join(get_package_share_directory('depthai_descriptions'), 'launch')
depthai_prefix = get_package_share_directory("depthai_ros_driver")
parent_frame = LaunchConfiguration('parent_frame', default = 'base_footprint')
return [
Node(
condition=IfCondition(LaunchConfiguration("use_rviz").perform(context)),
Expand All @@ -28,12 +26,9 @@ def launch_setup(context, *args, **kwargs):
),
IncludeLaunchDescription(
PythonLaunchDescriptionSource(
os.path.join(urdf_launch_dir, 'urdf_launch.py')),
launch_arguments={'tf_prefix': name,
'base_frame': name,
'parent_frame': parent_frame,
'use_composition': 'true',
'use_base_descr': 'true'}.items()),
os.path.join(get_package_share_directory('rae_description'), 'launch', 'rsp.launch.py')),
launch_arguments={'sim': 'false'}.items()
),

ComposableNodeContainer(
name=name+"_container",
Expand Down Expand Up @@ -80,12 +75,13 @@ 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"),
DeclareLaunchArgument("use_rviz", default_value='false'),
DeclareLaunchArgument("recording_folder", default_value=""),
DeclareLaunchArgument("parent_frame", default_value="oak-d-base-frame"),
DeclareLaunchArgument("params_file", default_value=os.path.join(spectacular_prefix, 'launch', 'oak_d.yaml')),
DeclareLaunchArgument("parent_frame", default_value="base_footprint"),
DeclareLaunchArgument("params_file", default_value=os.path.join(rae_camera_prefix, 'config', 'spectacular.yaml')),
DeclareLaunchArgument("rviz_config", default_value=os.path.join(spectacular_prefix, 'launch', 'oak_d.rviz')),
]
return LaunchDescription(
Expand Down

0 comments on commit 57288c0

Please sign in to comment.