Skip to main content
added 2 characters in body
Source Link
voiddouble ComputeOmega(T &target_state, T &current_state);
  1. Use a pub/sub messaging model with google protobuf
  2. Use a Class-Loader that loads the .so at runtime, and this loader can be configured to load the appropriate ClassName via some external yml file.
void ComputeOmega(T &target_state, T &current_state);
  1. Use a pub/sub messaging model
  2. Use a Class-Loader that loads the .so at runtime, and this loader can be configured to load the appropriate ClassName via some external yml file.
double ComputeOmega(T &target_state, T &current_state);
  1. Use a pub/sub messaging model with google protobuf
  2. Use a Class-Loader that loads the .so at runtime, and this loader can be configured to load the appropriate ClassName via some external yml file.
added 1137 characters in body
Source Link

The agent will have to know the relevant Command class to use for a differential drive robot, which is angular velocity of the two wheels, where as for a bicyle model, the actuators can range from throttle/break, to an RC car with two motors; one on the rear wheels to move the car, and another to turn the front two wheels (usually motor connected to a spring that turns the front wheels).

Another case is the communication of values between the components, for example:

The PID would have something like:

void ComputeOmega(T &target_state, T &current_state);

I think I maybe able to solve both these issues as follows:

  1. Use a pub/sub messaging model
  2. Use a Class-Loader that loads the .so at runtime, and this loader can be configured to load the appropriate ClassName via some external yml file.

The agent will have to know the relevant Command class to use for a differential drive robot, which is angular velocity of the two wheels, where as for a bicyle model, the actuators can range from throttle/break, to an RC car with two motors; one on the rear wheels to move the car, and another to turn the front two wheels (usually motor connected to a spring that turns the front wheels)

The agent will have to know the relevant Command class to use for a differential drive robot, which is angular velocity of the two wheels, where as for a bicyle model, the actuators can range from throttle/break, to an RC car with two motors; one on the rear wheels to move the car, and another to turn the front two wheels (usually motor connected to a spring that turns the front wheels).

Another case is the communication of values between the components, for example:

The PID would have something like:

void ComputeOmega(T &target_state, T &current_state);

I think I maybe able to solve both these issues as follows:

  1. Use a pub/sub messaging model
  2. Use a Class-Loader that loads the .so at runtime, and this loader can be configured to load the appropriate ClassName via some external yml file.
added 1137 characters in body
Source Link

Update

To make the question more clear, please consider the following scenario:

The factory method for the actuator needs to know which type of Command object to use when constructing the implementation of the interface, such as:

#pragma once

namespace tareeq {
  namespace control {
      template <class T, class T1>
      class Actuators {
      public:
    virtual ~Actuators() = default;

    virtual bool Init(T Config) = 0;
    virtual bool Start() = 0;
    virtual bool Stop() = 0;
    virtual bool Drive(T1 Command) = 0;
      };

      std::unique_ptr<Actuators> MakeAcutator();

  } // namespace control
} // namespace tareeq

The agent will have to know the relevant Command class to use for a differential drive robot, which is angular velocity of the two wheels, where as for a bicyle model, the actuators can range from throttle/break, to an RC car with two motors; one on the rear wheels to move the car, and another to turn the front two wheels (usually motor connected to a spring that turns the front wheels)

Update

To make the question more clear, please consider the following scenario:

The factory method for the actuator needs to know which type of Command object to use when constructing the implementation of the interface, such as:

#pragma once

namespace tareeq {
  namespace control {
      template <class T, class T1>
      class Actuators {
      public:
    virtual ~Actuators() = default;

    virtual bool Init(T Config) = 0;
    virtual bool Start() = 0;
    virtual bool Stop() = 0;
    virtual bool Drive(T1 Command) = 0;
      };

      std::unique_ptr<Actuators> MakeAcutator();

  } // namespace control
} // namespace tareeq

The agent will have to know the relevant Command class to use for a differential drive robot, which is angular velocity of the two wheels, where as for a bicyle model, the actuators can range from throttle/break, to an RC car with two motors; one on the rear wheels to move the car, and another to turn the front two wheels (usually motor connected to a spring that turns the front wheels)

edited body
Source Link
Loading
Source Link
Loading