Skip to content

Commit

Permalink
add dummy GetContactsFromLastStepFeature
Browse files Browse the repository at this point in the history
Signed-off-by: claireyywang <[email protected]>
  • Loading branch information
claireyywang committed Apr 23, 2020
1 parent 344f7f4 commit c4972c2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
8 changes: 8 additions & 0 deletions tpe/plugin/src/SimulationFeatures.cc
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,11 @@ void SimulationFeatures::WorldForwardStep(
}
world->Step();
}

std::vector<SimulationFeatures::ContactInternal>
SimulationFeatures::GetContactsFromLastStep(const Identity &_worldID) const
{
std::vector<SimulationFeatures::ContactInternal> outContacts;
std::shared_ptr<tpelib::World> world = this->worlds.at(_worldID)->world;
return outContacts;
}
8 changes: 7 additions & 1 deletion tpe/plugin/src/SimulationFeatures.hh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
#ifndef IGNITION_PHYSICS_TPE_PLUGIN_SRC_SIMULATIONFEATURES_HH_
#define IGNITION_PHYSICS_TPE_PLUGIN_SRC_SIMULATIONFEATURES_HH_

#include <vector>
#include <ignition/physics/ForwardStep.hh>
#include <ignition/physics/GetContacts.hh>

#include "Base.hh"

Expand All @@ -27,7 +29,8 @@ namespace physics {
namespace tpeplugin {

struct SimulationFeatureList : FeatureList<
ForwardStep
ForwardStep,
GetContactsFromLastStepFeature
> { };

class SimulationFeatures :
Expand All @@ -39,6 +42,9 @@ class SimulationFeatures :
ForwardStep::Output &_h,
ForwardStep::State &_x,
const ForwardStep::Input &_u) override;

public: std::vector<ContactInternal> GetContactsFromLastStep(
const Identity &_worldID) const override;
};

}
Expand Down

0 comments on commit c4972c2

Please sign in to comment.