Skip to content

Commit

Permalink
renaming: object_tracker -> tracker
Browse files Browse the repository at this point in the history
  • Loading branch information
wumanu committed Aug 2, 2016
1 parent 8c2249f commit 7b1e04d
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 23 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ set(dbot_SOURCES
${dbot_SOURCE_DIR}/simple_shader_provider.cpp
${dbot_SOURCE_DIR}/default_shader_provider.cpp
${dbot_SOURCE_DIR}/file_shader_provider.cpp
${dbot_SOURCE_DIR}/tracker/object_tracker.cpp
${dbot_SOURCE_DIR}/tracker/tracker.cpp
${dbot_SOURCE_DIR}/tracker/particle_tracker.cpp
${dbot_SOURCE_DIR}/tracker/gaussian_tracker.cpp
${dbot_SOURCE_DIR}/builder/rb_sensor_builder.cpp
Expand Down
2 changes: 1 addition & 1 deletion source/dbot/tracker/gaussian_tracker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ GaussianTracker::GaussianTracker(
const std::shared_ptr<ObjectModel>& object_model,
double update_rate,
bool center_object_frame)
: ObjectTracker(object_model, update_rate, center_object_frame),
: Tracker(object_model, update_rate, center_object_frame),
filter_(filter),
belief_(filter_->create_belief())
{
Expand Down
4 changes: 2 additions & 2 deletions source/dbot/tracker/gaussian_tracker.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

#pragma once

#include <dbot/tracker/object_tracker.hpp>
#include <dbot/tracker/tracker.hpp>
#include <dbot/model/depth_pixel_model.hpp>

#include <fl/util/types.hpp>
Expand All @@ -40,7 +40,7 @@

namespace dbot
{
class GaussianTracker : public ObjectTracker
class GaussianTracker : public Tracker
{
public:
/* ---------------------------------------------------------------------- */
Expand Down
2 changes: 1 addition & 1 deletion source/dbot/tracker/particle_tracker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ ParticleTracker::ParticleTracker(
int evaluation_count,
double update_rate,
bool center_object_frame)
: ObjectTracker(object_model, update_rate, center_object_frame),
: Tracker(object_model, update_rate, center_object_frame),
filter_(filter),
evaluation_count_(evaluation_count)
{
Expand Down
7 changes: 3 additions & 4 deletions source/dbot/tracker/particle_tracker.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,21 @@

#include <fl/model/transition/interface/transition_function.hpp>

#include <dbot/tracker/object_tracker.hpp>
#include <dbot/tracker/tracker.hpp>
#include <dbot/filter/rao_blackwell_coordinate_particle_filter.hpp>

namespace dbot
{
/**
* \brief ParticleTracker
*/
class ParticleTracker : public ObjectTracker
class ParticleTracker : public Tracker
{
public:
typedef fl::TransitionFunction<State, Noise, Input> Transition;
typedef RbSensor<State> Sensor;

typedef RaoBlackwellCoordinateParticleFilter<Transition,
Sensor> Filter;
typedef RaoBlackwellCoordinateParticleFilter<Transition, Sensor> Filter;

public:
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
*/

#include <fl/util/profiling.hpp>
#include <dbot/tracker/object_tracker.hpp>
#include <dbot/tracker/tracker.hpp>

namespace dbot
{
ObjectTracker::ObjectTracker(const std::shared_ptr<ObjectModel> &object_model,
Tracker::Tracker(const std::shared_ptr<ObjectModel> &object_model,
double update_rate,
bool center_object_frame)
: object_model_(object_model),
Expand All @@ -26,7 +26,7 @@ ObjectTracker::ObjectTracker(const std::shared_ptr<ObjectModel> &object_model,
{
}

void ObjectTracker::initialize(const std::vector<State>& initial_states)
void Tracker::initialize(const std::vector<State>& initial_states)
{
std::lock_guard<std::mutex> lock(mutex_);

Expand All @@ -39,8 +39,8 @@ void ObjectTracker::initialize(const std::vector<State>& initial_states)
moving_average_ = to_model_coordinate_system(on_initialize(states));
}

void ObjectTracker::move_average(const ObjectTracker::State& new_state,
ObjectTracker::State& moving_average,
void Tracker::move_average(const Tracker::State& new_state,
Tracker::State& moving_average,
double update_rate)
{
for (int i = 0; i < moving_average.count(); i++)
Expand Down Expand Up @@ -68,7 +68,7 @@ void ObjectTracker::move_average(const ObjectTracker::State& new_state,
}
}

auto ObjectTracker::track(const Obsrv& image) -> State
auto Tracker::track(const Obsrv& image) -> State
{
std::lock_guard<std::mutex> lock(mutex_);

Expand All @@ -79,8 +79,8 @@ auto ObjectTracker::track(const Obsrv& image) -> State
return moving_average_;
}

auto ObjectTracker::to_center_coordinate_system(
const ObjectTracker::State& state) -> State
auto Tracker::to_center_coordinate_system(
const Tracker::State& state) -> State
{
if (!center_object_frame_) return state;

Expand All @@ -96,8 +96,8 @@ auto ObjectTracker::to_center_coordinate_system(
}


auto ObjectTracker::to_model_coordinate_system(
const ObjectTracker::State& state) -> State
auto Tracker::to_model_coordinate_system(
const Tracker::State& state) -> State
{
if (!center_object_frame_) return state;

Expand All @@ -112,7 +112,7 @@ auto ObjectTracker::to_model_coordinate_system(
return model_state;
}

ObjectTracker::Input ObjectTracker::zero_input() const
Tracker::Input Tracker::zero_input() const
{
return Input::Zero(1);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ namespace dbot
/**
* \brief Abstract ObjectTracker context
*/
class ObjectTracker
class Tracker
{
public:
typedef osr::FreeFloatingRigidBodiesState<> State;
Expand All @@ -57,11 +57,11 @@ class ObjectTracker
* \param update_rate
* Moving average update rate
*/
ObjectTracker(const std::shared_ptr<ObjectModel>& object_model,
Tracker(const std::shared_ptr<ObjectModel>& object_model,
double update_rate,
bool center_object_frame);

virtual ~ObjectTracker() { }
virtual ~Tracker() { }

/**
* \brief Hook function which is called during tracking
Expand Down

0 comments on commit 7b1e04d

Please sign in to comment.