Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use object_centers.csv in share directory #47

Merged
merged 5 commits into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/autoware_practice_lidar_simulator/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ if(BUILD_TESTING)
ament_lint_auto_find_test_dependencies()
endif()

ament_auto_package(INSTALL_TO_SHARE launch)
ament_auto_package(INSTALL_TO_SHARE config launch)
1 change: 1 addition & 0 deletions src/autoware_practice_lidar_simulator/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

<buildtool_depend>ament_cmake_auto</buildtool_depend>

<depend>ament_index_cpp</depend>
<depend>autoware_auto_control_msgs</depend>
<depend>autoware_auto_planning_msgs</depend>
<depend>autoware_auto_vehicle_msgs</depend>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

#include "simple_lidar_simulator.hpp"

#include <ament_index_cpp/get_package_share_directory.hpp>

#include <pcl_conversions/pcl_conversions.h>

#include <fstream>
Expand All @@ -35,7 +37,8 @@ SampleNode::SampleNode() : Node("simple_lidar_simulator")
timer_ = rclcpp::create_timer(this, get_clock(), period, [this] { on_timer(); });

// 物体の中心位置リストをCSVから読み取って初期化
object_centers_ = load_object_centers_from_csv("src/autoware_practice_lidar_simulator/config/object_centers.csv");
const auto pkg_path = ament_index_cpp::get_package_share_directory("autoware_practice_lidar_simulator");
object_centers_ = load_object_centers_from_csv(pkg_path + "/config/object_centers.csv");
}

void SampleNode::pose_callback(const PoseStamped::SharedPtr msg)
Expand Down
Loading