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

refactor(kalman_filter): prefix package and namespace with autoware #7787

Merged
merged 2 commits into from
Aug 19, 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 .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ common/autoware_ad_api_specs/** isamu.takagi@tier4.jp ryohsuke.mitsudome@tier4.j
common/autoware_auto_common/** opensource@apex.ai satoshi.ota@tier4.jp shumpei.wakabayashi@tier4.jp tomoya.kimura@tier4.jp
common/autoware_geography_utils/** koji.minoda@tier4.jp
common/autoware_grid_map_utils/** maxime.clement@tier4.jp
common/autoware_kalman_filter/** koji.minoda@tier4.jp takeshi.ishita@tier4.jp yukihiro.saito@tier4.jp
common/autoware_motion_utils/** fumiya.watanabe@tier4.jp kosuke.takeuchi@tier4.jp mamoru.sobue@tier4.jp satoshi.ota@tier4.jp taiki.tanaka@tier4.jp takamasa.horibe@tier4.jp takayuki.murooka@tier4.jp tomoya.kimura@tier4.jp
common/autoware_overlay_rviz_plugin/autoware_mission_details_overlay_rviz_plugin/** ahmed.ebrahim@leodrive.ai
common/autoware_overlay_rviz_plugin/autoware_overlay_rviz_plugin/** khalil@leodrive.ai
Expand All @@ -22,7 +23,6 @@ common/global_parameter_loader/** ryohsuke.mitsudome@tier4.jp
common/glog_component/** takamasa.horibe@tier4.jp
common/goal_distance_calculator/** taiki.tanaka@tier4.jp
common/interpolation/** fumiya.watanabe@tier4.jp takayuki.murooka@tier4.jp
common/kalman_filter/** koji.minoda@tier4.jp takeshi.ishita@tier4.jp yukihiro.saito@tier4.jp
common/object_recognition_utils/** shunsuke.miura@tier4.jp takayuki.murooka@tier4.jp yoshi.ri@tier4.jp
common/osqp_interface/** fumiya.watanabe@tier4.jp maxime.clement@tier4.jp satoshi.ota@tier4.jp takayuki.murooka@tier4.jp
common/perception_utils/** shunsuke.miura@tier4.jp yoshi.ri@tier4.jp
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.14)
project(kalman_filter)
project(autoware_kalman_filter)

find_package(autoware_cmake REQUIRED)
autoware_package()
Expand All @@ -12,18 +12,18 @@ include_directories(
${EIGEN3_INCLUDE_DIR}
)

ament_auto_add_library(kalman_filter SHARED
ament_auto_add_library(${PROJECT_NAME} SHARED
src/kalman_filter.cpp
src/time_delay_kalman_filter.cpp
include/kalman_filter/kalman_filter.hpp
include/kalman_filter/time_delay_kalman_filter.hpp
include/autoware/kalman_filter/kalman_filter.hpp
include/autoware/kalman_filter/time_delay_kalman_filter.hpp
)

if(BUILD_TESTING)
file(GLOB_RECURSE test_files test/*.cpp)
ament_add_ros_isolated_gtest(test_kalman_filter ${test_files})
ament_add_ros_isolated_gtest(test_${PROJECT_NAME} ${test_files})

target_link_libraries(test_kalman_filter kalman_filter)
target_link_libraries(test_${PROJECT_NAME} ${PROJECT_NAME})
endif()

ament_auto_package()
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef KALMAN_FILTER__KALMAN_FILTER_HPP_
#define KALMAN_FILTER__KALMAN_FILTER_HPP_
#ifndef AUTOWARE__KALMAN_FILTER__KALMAN_FILTER_HPP_
#define AUTOWARE__KALMAN_FILTER__KALMAN_FILTER_HPP_

#include <Eigen/Core>
#include <Eigen/LU>

namespace autoware::kalman_filter
{

/**
* @file kalman_filter.h
* @brief kalman filter class
Expand Down Expand Up @@ -207,4 +210,5 @@ class KalmanFilter
Eigen::MatrixXd R_; //!< @brief covariance matrix for measurement model y[k] = C * x[k]
Eigen::MatrixXd P_; //!< @brief covariance of estimated state
};
#endif // KALMAN_FILTER__KALMAN_FILTER_HPP_
} // namespace autoware::kalman_filter
#endif // AUTOWARE__KALMAN_FILTER__KALMAN_FILTER_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,18 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef KALMAN_FILTER__TIME_DELAY_KALMAN_FILTER_HPP_
#define KALMAN_FILTER__TIME_DELAY_KALMAN_FILTER_HPP_
#ifndef AUTOWARE__KALMAN_FILTER__TIME_DELAY_KALMAN_FILTER_HPP_
#define AUTOWARE__KALMAN_FILTER__TIME_DELAY_KALMAN_FILTER_HPP_

#include "kalman_filter/kalman_filter.hpp"
#include "autoware/kalman_filter/kalman_filter.hpp"

#include <Eigen/Core>
#include <Eigen/LU>

#include <iostream>

namespace autoware::kalman_filter
{
/**
* @file time_delay_kalman_filter.h
* @brief kalman filter with delayed measurement class
Expand Down Expand Up @@ -83,4 +85,5 @@ class TimeDelayKalmanFilter : public KalmanFilter
int dim_x_; //!< @brief dimension of latest state
int dim_x_ex_; //!< @brief dimension of extended state with dime delay
};
#endif // KALMAN_FILTER__TIME_DELAY_KALMAN_FILTER_HPP_
} // namespace autoware::kalman_filter
#endif // AUTOWARE__KALMAN_FILTER__TIME_DELAY_KALMAN_FILTER_HPP_
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>kalman_filter</name>
<name>autoware_kalman_filter</name>
<version>0.1.0</version>
<description>The kalman filter package</description>
<maintainer email="yukihiro.saito@tier4.jp">Yukihiro Saito</maintainer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "kalman_filter/kalman_filter.hpp"
#include "autoware/kalman_filter/kalman_filter.hpp"

namespace autoware::kalman_filter
{
KalmanFilter::KalmanFilter()
{
}
Expand Down Expand Up @@ -156,3 +158,4 @@ bool KalmanFilter::update(const Eigen::MatrixXd & y)
{
return update(y, C_, R_);
}
} // namespace autoware::kalman_filter
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "kalman_filter/time_delay_kalman_filter.hpp"
#include "autoware/kalman_filter/time_delay_kalman_filter.hpp"

namespace autoware::kalman_filter
{
TimeDelayKalmanFilter::TimeDelayKalmanFilter()
{
}
Expand Down Expand Up @@ -102,3 +104,4 @@ bool TimeDelayKalmanFilter::updateWithDelay(

return true;
}
} // namespace autoware::kalman_filter
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "kalman_filter/kalman_filter.hpp"
#include "autoware/kalman_filter/kalman_filter.hpp"

#include <gtest/gtest.h>

using autoware::kalman_filter::KalmanFilter;

TEST(kalman_filter, kf)
{
KalmanFilter kf_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "kalman_filter/time_delay_kalman_filter.hpp"
#include "autoware/kalman_filter/time_delay_kalman_filter.hpp"

#include <gtest/gtest.h>

using autoware::kalman_filter::TimeDelayKalmanFilter;

TEST(time_delay_kalman_filter, td_kf)
{
TimeDelayKalmanFilter td_kf_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
#include "ekf_localizer/state_index.hpp"
#include "ekf_localizer/warning.hpp"

#include <kalman_filter/kalman_filter.hpp>
#include <kalman_filter/time_delay_kalman_filter.hpp>
#include <autoware/kalman_filter/kalman_filter.hpp>
#include <autoware/kalman_filter/time_delay_kalman_filter.hpp>
#include <rclcpp/rclcpp.hpp>

#include <geometry_msgs/msg/pose_stamped.hpp>
Expand All @@ -34,6 +34,8 @@
#include <memory>
#include <vector>

using autoware::kalman_filter::TimeDelayKalmanFilter;

struct EKFDiagnosticInfo
{
size_t no_update_count{0};
Expand Down
2 changes: 1 addition & 1 deletion localization/ekf_localizer/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@

<build_depend>eigen</build_depend>

<depend>autoware_kalman_filter</depend>
<depend>autoware_universe_utils</depend>
<depend>diagnostic_msgs</depend>
<depend>fmt</depend>
<depend>geometry_msgs</depend>
<depend>kalman_filter</depend>
<depend>localization_util</depend>
<depend>nav_msgs</depend>
<depend>rclcpp</depend>
Expand Down
5 changes: 3 additions & 2 deletions perception/autoware_bytetrack/lib/include/strack.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@

#pragma once

// #include "kalman_filter.h"
#include <kalman_filter/kalman_filter.hpp>
#include <autoware/kalman_filter/kalman_filter.hpp>
#include <opencv2/opencv.hpp>

#include <boost/uuid/uuid.hpp>
Expand All @@ -49,19 +48,21 @@

enum TrackState { New = 0, Tracked, Lost, Removed };

using autoware::kalman_filter::KalmanFilter;

/** manage one tracklet*/
class STrack
{
public:
STrack(std::vector<float> tlwh_, float score, int label);

Check warning on line 57 in perception/autoware_bytetrack/lib/include/strack.h

View workflow job for this annotation

GitHub Actions / spell-check-differential

Unknown word (tlwh)
~STrack();

std::vector<float> static tlbr_to_tlwh(std::vector<float> & tlbr);

Check warning on line 60 in perception/autoware_bytetrack/lib/include/strack.h

View workflow job for this annotation

GitHub Actions / spell-check-differential

Unknown word (tlwh)
static void multi_predict(std::vector<STrack *> & stracks);

Check warning on line 61 in perception/autoware_bytetrack/lib/include/strack.h

View workflow job for this annotation

GitHub Actions / spell-check-differential

Unknown word (stracks)
void static_tlwh();

Check warning on line 62 in perception/autoware_bytetrack/lib/include/strack.h

View workflow job for this annotation

GitHub Actions / spell-check-differential

Unknown word (tlwh)
void static_tlbr();
std::vector<float> tlwh_to_xyah(std::vector<float> tlwh_tmp);

Check warning on line 64 in perception/autoware_bytetrack/lib/include/strack.h

View workflow job for this annotation

GitHub Actions / spell-check-differential

Unknown word (tlwh)

Check warning on line 64 in perception/autoware_bytetrack/lib/include/strack.h

View workflow job for this annotation

GitHub Actions / spell-check-differential

Unknown word (xyah)

Check warning on line 64 in perception/autoware_bytetrack/lib/include/strack.h

View workflow job for this annotation

GitHub Actions / spell-check-differential

Unknown word (tlwh)
std::vector<float> to_xyah();

Check warning on line 65 in perception/autoware_bytetrack/lib/include/strack.h

View workflow job for this annotation

GitHub Actions / spell-check-differential

Unknown word (xyah)
void mark_lost();
void mark_removed();
int next_id();
Expand Down
2 changes: 1 addition & 1 deletion perception/autoware_bytetrack/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
<buildtool_export_depend>cudnn_cmake_module</buildtool_export_depend>
<buildtool_export_depend>tensorrt_cmake_module</buildtool_export_depend>

<depend>autoware_kalman_filter</depend>
<depend>autoware_perception_msgs</depend>
<depend>cuda_utils</depend>
<depend>cv_bridge</depend>
<depend>eigen</depend>
<depend>image_transport</depend>
<depend>kalman_filter</depend>
<depend>libboost-system-dev</depend>
<depend>libopencv-dev</depend>
<depend>rclcpp</depend>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
#ifndef AUTOWARE__MULTI_OBJECT_TRACKER__TRACKER__MODEL__BICYCLE_TRACKER_HPP_
#define AUTOWARE__MULTI_OBJECT_TRACKER__TRACKER__MODEL__BICYCLE_TRACKER_HPP_

#include "autoware/kalman_filter/kalman_filter.hpp"
#include "autoware/multi_object_tracker/tracker/model/tracker_base.hpp"
#include "autoware/multi_object_tracker/tracker/motion_model/bicycle_motion_model.hpp"
#include "autoware/multi_object_tracker/tracker/object_model/object_model.hpp"
#include "kalman_filter/kalman_filter.hpp"

namespace autoware::multi_object_tracker
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
#ifndef AUTOWARE__MULTI_OBJECT_TRACKER__TRACKER__MODEL__BIG_VEHICLE_TRACKER_HPP_
#define AUTOWARE__MULTI_OBJECT_TRACKER__TRACKER__MODEL__BIG_VEHICLE_TRACKER_HPP_

#include "autoware/kalman_filter/kalman_filter.hpp"
#include "autoware/multi_object_tracker/tracker/model/tracker_base.hpp"
#include "autoware/multi_object_tracker/tracker/motion_model/bicycle_motion_model.hpp"
#include "autoware/multi_object_tracker/tracker/object_model/object_model.hpp"
#include "kalman_filter/kalman_filter.hpp"

namespace autoware::multi_object_tracker
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
#ifndef AUTOWARE__MULTI_OBJECT_TRACKER__TRACKER__MODEL__MULTIPLE_VEHICLE_TRACKER_HPP_
#define AUTOWARE__MULTI_OBJECT_TRACKER__TRACKER__MODEL__MULTIPLE_VEHICLE_TRACKER_HPP_

#include "autoware/kalman_filter/kalman_filter.hpp"
#include "autoware/multi_object_tracker/tracker/model/big_vehicle_tracker.hpp"
#include "autoware/multi_object_tracker/tracker/model/normal_vehicle_tracker.hpp"
#include "autoware/multi_object_tracker/tracker/model/tracker_base.hpp"
#include "kalman_filter/kalman_filter.hpp"

#include <rclcpp/time.hpp>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
#ifndef AUTOWARE__MULTI_OBJECT_TRACKER__TRACKER__MODEL__NORMAL_VEHICLE_TRACKER_HPP_
#define AUTOWARE__MULTI_OBJECT_TRACKER__TRACKER__MODEL__NORMAL_VEHICLE_TRACKER_HPP_

#include "autoware/kalman_filter/kalman_filter.hpp"
#include "autoware/multi_object_tracker/tracker/model/tracker_base.hpp"
#include "autoware/multi_object_tracker/tracker/motion_model/bicycle_motion_model.hpp"
#include "autoware/multi_object_tracker/tracker/object_model/object_model.hpp"
#include "kalman_filter/kalman_filter.hpp"

namespace autoware::multi_object_tracker
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#ifndef AUTOWARE__MULTI_OBJECT_TRACKER__TRACKER__MODEL__PASS_THROUGH_TRACKER_HPP_
#define AUTOWARE__MULTI_OBJECT_TRACKER__TRACKER__MODEL__PASS_THROUGH_TRACKER_HPP_

#include "kalman_filter/kalman_filter.hpp"
#include "autoware/kalman_filter/kalman_filter.hpp"
#include "tracker_base.hpp"

namespace autoware::multi_object_tracker
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
#ifndef AUTOWARE__MULTI_OBJECT_TRACKER__TRACKER__MODEL__PEDESTRIAN_AND_BICYCLE_TRACKER_HPP_
#define AUTOWARE__MULTI_OBJECT_TRACKER__TRACKER__MODEL__PEDESTRIAN_AND_BICYCLE_TRACKER_HPP_

#include "autoware/kalman_filter/kalman_filter.hpp"
#include "autoware/multi_object_tracker/tracker/model/bicycle_tracker.hpp"
#include "autoware/multi_object_tracker/tracker/model/pedestrian_tracker.hpp"
#include "autoware/multi_object_tracker/tracker/model/tracker_base.hpp"
#include "kalman_filter/kalman_filter.hpp"

namespace autoware::multi_object_tracker
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
#ifndef AUTOWARE__MULTI_OBJECT_TRACKER__TRACKER__MODEL__PEDESTRIAN_TRACKER_HPP_
#define AUTOWARE__MULTI_OBJECT_TRACKER__TRACKER__MODEL__PEDESTRIAN_TRACKER_HPP_

#include "autoware/kalman_filter/kalman_filter.hpp"
#include "autoware/multi_object_tracker/tracker/model/tracker_base.hpp"
#include "autoware/multi_object_tracker/tracker/motion_model/ctrv_motion_model.hpp"
#include "autoware/multi_object_tracker/tracker/object_model/object_model.hpp"
#include "kalman_filter/kalman_filter.hpp"

namespace autoware::multi_object_tracker
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
#ifndef AUTOWARE__MULTI_OBJECT_TRACKER__TRACKER__MODEL__UNKNOWN_TRACKER_HPP_
#define AUTOWARE__MULTI_OBJECT_TRACKER__TRACKER__MODEL__UNKNOWN_TRACKER_HPP_

#include "autoware/kalman_filter/kalman_filter.hpp"
#include "autoware/multi_object_tracker/tracker/model/tracker_base.hpp"
#include "autoware/multi_object_tracker/tracker/motion_model/cv_motion_model.hpp"
#include "kalman_filter/kalman_filter.hpp"

namespace autoware::multi_object_tracker
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
#ifndef AUTOWARE__MULTI_OBJECT_TRACKER__TRACKER__MOTION_MODEL__BICYCLE_MOTION_MODEL_HPP_
#define AUTOWARE__MULTI_OBJECT_TRACKER__TRACKER__MOTION_MODEL__BICYCLE_MOTION_MODEL_HPP_

#include "autoware/kalman_filter/kalman_filter.hpp"
#include "autoware/multi_object_tracker/tracker/motion_model/motion_model_base.hpp"
#include "kalman_filter/kalman_filter.hpp"

#include <Eigen/Core>
#include <rclcpp/rclcpp.hpp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
#ifndef AUTOWARE__MULTI_OBJECT_TRACKER__TRACKER__MOTION_MODEL__CTRV_MOTION_MODEL_HPP_
#define AUTOWARE__MULTI_OBJECT_TRACKER__TRACKER__MOTION_MODEL__CTRV_MOTION_MODEL_HPP_

#include "autoware/kalman_filter/kalman_filter.hpp"
#include "autoware/multi_object_tracker/tracker/motion_model/motion_model_base.hpp"
#include "kalman_filter/kalman_filter.hpp"

#include <Eigen/Core>
#include <rclcpp/rclcpp.hpp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
#ifndef AUTOWARE__MULTI_OBJECT_TRACKER__TRACKER__MOTION_MODEL__CV_MOTION_MODEL_HPP_
#define AUTOWARE__MULTI_OBJECT_TRACKER__TRACKER__MOTION_MODEL__CV_MOTION_MODEL_HPP_

#include "autoware/kalman_filter/kalman_filter.hpp"
#include "autoware/multi_object_tracker/tracker/motion_model/motion_model_base.hpp"
#include "kalman_filter/kalman_filter.hpp"

#include <Eigen/Core>
#include <rclcpp/rclcpp.hpp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#ifndef AUTOWARE__MULTI_OBJECT_TRACKER__TRACKER__MOTION_MODEL__MOTION_MODEL_BASE_HPP_
#define AUTOWARE__MULTI_OBJECT_TRACKER__TRACKER__MOTION_MODEL__MOTION_MODEL_BASE_HPP_

#include "kalman_filter/kalman_filter.hpp"
#include "autoware/kalman_filter/kalman_filter.hpp"

#include <Eigen/Core>
#include <rclcpp/rclcpp.hpp>
Expand All @@ -33,6 +33,7 @@

namespace autoware::multi_object_tracker
{
using autoware::kalman_filter::KalmanFilter;

class MotionModel
{
Expand Down
2 changes: 1 addition & 1 deletion perception/autoware_multi_object_tracker/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
<buildtool_depend>autoware_cmake</buildtool_depend>
<buildtool_depend>eigen3_cmake_module</buildtool_depend>

<depend>autoware_kalman_filter</depend>
<depend>autoware_perception_msgs</depend>
<depend>autoware_universe_utils</depend>
<depend>diagnostic_updater</depend>
<depend>eigen</depend>
<depend>glog</depend>
<depend>kalman_filter</depend>
<depend>mussp</depend>
<depend>object_recognition_utils</depend>
<depend>rclcpp</depend>
Expand Down
Loading
Loading