Skip to content
Open
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
3 changes: 2 additions & 1 deletion urdf_model/include/urdf_model/model.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
#include <boost/function.hpp>
#include <urdf_model/link.h>
#include <urdf_exception/exception.h>
#include <urdf_sensor/sensor.h>

namespace urdf {

Expand Down Expand Up @@ -197,7 +198,7 @@ class ModelInterface
/// \brief The root is always a link (the parent of the tree describing the robot)
boost::shared_ptr<Link> root_link_;


std::map<std::string, boost::shared_ptr<Sensor> > sensors_;

};

Expand Down
15 changes: 11 additions & 4 deletions urdf_sensor/include/urdf_sensor/sensor.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,18 @@

namespace urdf{

class VisualSensor
class SensorBase {
public:
enum {VISUAL, FORCE, TACTILE, IMU, GYRO, ACCELERATION, GPS} sensor_type;
virtual ~SensorBase(void)
{
}
};

class VisualSensor : public SensorBase
{
public:
enum {CAMERA, RAY} type;
enum {CAMERA, RAY, DEPTH} type;
virtual ~VisualSensor(void)
{
}
Expand Down Expand Up @@ -148,8 +156,7 @@ class Sensor
Pose origin;

/// sensor
boost::shared_ptr<VisualSensor> sensor;

boost::shared_ptr<SensorBase> sensor;

/// Parent link element name. A pointer is stored in parent_link_.
std::string parent_link_name;
Expand Down