#ifndef __STEER_DRIVE_H_INCLUDED
#define __STEER_DRIVE_H_INCLUDED

#include <ros/ros.h>

namespace models
{ 
class BaseSteerDrive
{
public:

  /**
   * @brief  Constructs 
   * @param name The name to give this instance of the model base
  */
  virtual void initialize(ros::NodeHandle & nh, const std::string &name) = 0;

  /**
   * @brief  Constructs 
   * @param name Check model is deady
   * @return true, if model is ready, false otherwise
  */
  virtual bool Ready() {return true;}

  
  /**
   * @brief Get the velocity limit on axis(index).
   * @return Velocity limit specified in SDF
   */ 
  virtual double GetVelocityLimit(unsigned int _index) = 0;

  /**
   * @brief Set the velocity limit on a joint axis.
   * @param[in] _velocity Velocity limit for the axis.
   */ 
  virtual void SetVelocityLimit(double _velocity) = 0;

  /**
   * @brief Get the rotation rate of an axis(index)
   * @return The rotaional velocity of the joint axis.
   */ 
  virtual double GetVelocity() = 0;

  /**
   * @brief Set the velocity of an axis(index).
   * In ODE and Bullet, the SetVelocityMaximal function is used to
   * set the velocity of the child link relative to the parent.
   * In Simbody and DART, this function updates the velocity state,
   * which has a recursive effect on the rest of the chain.
   * @param[in] _vel Velocity.
  */
  virtual void SetVelocity(double _vel) = 0;

  /**
   * @brief Get the position of an axis according to its index.
   *
   * For rotational axes, the value is in radians. For prismatic axes,
   * it is in meters.
   *
   * For static models, it returns the static joint position.
   *
   * It returns ignition::math::NAN_D in case the position can't be
   * obtained. For instance, if the index is invalid, if the joint is
   * fixed, etc.
   *
   * Subclasses can't override this method. See PositionImpl instead.
   *
   * @return Current position of the axis.
   * @sa PositionImpl
   */ 
  virtual double Position() = 0;

  /**
   * @brief The child links of this joint are updated based on desired
   * position.  And all the links connected to the child link of this joint
   * except through the parent link of this joint moves with the child
   * link.
   * @param[in] _position Position to set the joint to.
   * unspecified, pure kinematic teleportation.
   * link with respect to the world frame will remain the same after
   * setting the position. By default this is false, which means there are
   * no guarantees about what the child link's world velocity will be after
   * the position is changed (the behavior is determined by the underlying
   * physics engine).
   *
   * @note{Only ODE and Bullet support _preserveWorldVelocity being true.}
   */ 
  virtual void SetPosition(const double _position) = 0;

  /**
   * @brief Decontructor
  */
  virtual ~BaseSteerDrive() {}
  
protected:
  /**
   * @brief Contructor
  */
  BaseSteerDrive() {}

}; // class BaseSteerDrive

} // namespace models

#endif // __STEER_DRIVE_H_INCLUDED