From 813b681674e49a4942766f48a428a6cf70ebc58a Mon Sep 17 00:00:00 2001 From: Martin Huynh Date: Thu, 5 Oct 2023 18:15:31 +0200 Subject: [PATCH] Renamed launch files to YAML, WORKING ROS2 --- asv_setup/CMakeLists.txt | 6 +++++ asv_setup/launch/{pc.yaml => pc.launch.yaml} | 0 asv_setup/launch/tf.launch.yaml | 23 ++++++++++++++++++++ asv_setup/launch/tf.yaml | 16 -------------- 4 files changed, 29 insertions(+), 16 deletions(-) rename asv_setup/launch/{pc.yaml => pc.launch.yaml} (100%) create mode 100644 asv_setup/launch/tf.launch.yaml delete mode 100644 asv_setup/launch/tf.yaml diff --git a/asv_setup/CMakeLists.txt b/asv_setup/CMakeLists.txt index 3242be2e..25dfd784 100644 --- a/asv_setup/CMakeLists.txt +++ b/asv_setup/CMakeLists.txt @@ -23,4 +23,10 @@ if(BUILD_TESTING) ament_lint_auto_find_test_dependencies() endif() +# Install launch files. +install(DIRECTORY + launch + DESTINATION share/${PROJECT_NAME}/ +) + ament_package() diff --git a/asv_setup/launch/pc.yaml b/asv_setup/launch/pc.launch.yaml similarity index 100% rename from asv_setup/launch/pc.yaml rename to asv_setup/launch/pc.launch.yaml diff --git a/asv_setup/launch/tf.launch.yaml b/asv_setup/launch/tf.launch.yaml new file mode 100644 index 00000000..3df919bc --- /dev/null +++ b/asv_setup/launch/tf.launch.yaml @@ -0,0 +1,23 @@ +launch: + - node: + pkg: tf2_ros + exec: static_transform_publisher + name: base_link_to_lidar + args: --frame-id base_link --child-frame-id os_lidar --x 0 --y 0 --z 0.03565 --roll 0 --pitch 0 --yaw 0 + + - node: + pkg: tf2_ros + exec: static_transform_publisher + name: base_link_to_zed2_camera_center + args: --frame-id base_link --child-frame-id zed2i_camera_center --x -0.03005 --y 0 --z 0.2203 --roll 0 --pitch 0 --yaw 0 + +#Tall fra mechanical +#Lidar +#X: 0 +#Y (Høyde Z): Bunn til senter(50 - 28,35/2) + Origin til bunn av sensor(356,5) = 392.325 mm +#Z: 0 + +#Kamera +#X: -(268.56 mm + 31.58 mm) = -300.14 mm +#Y (Høyde Z): 179.01 mm + 42.37mm distanse fra sentrumtil linse = 221.38 mm +#Z (Y): 0 diff --git a/asv_setup/launch/tf.yaml b/asv_setup/launch/tf.yaml deleted file mode 100644 index 3a83b9f2..00000000 --- a/asv_setup/launch/tf.yaml +++ /dev/null @@ -1,16 +0,0 @@ -launch: - - transforms: - - name: base_link_to_lidar - pkg: tf2_ros - translation: [0.0, 0.0, 0.03565] - rotation: [0.0, 0.0, 0.0] - parent_frame_id: base_link - child_frame_id: os_lidar - - - name: base_link_to_zed2_camera_center - pkg: tf2_ros - translation: [-0.03005, 0.0, 0.2203] - rotation: [0.0, 0.0, 0.0] - parent_frame_id: base_link - child_frame_id: zed2i_camera_center -