Skip to content

Commit

Permalink
initial commit by rock-create-orogen
Browse files Browse the repository at this point in the history
  • Loading branch information
doudou committed Sep 13, 2019
0 parents commit 9db2535
Show file tree
Hide file tree
Showing 9 changed files with 1,671 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
templates/*
.orogen/*
*~
.*.swp
build/*

*autobuild-stamp

9 changes: 9 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
PROJECT(motors_weg_cvw300)
cmake_minimum_required(VERSION 2.6)

SET (CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/.orogen/config")
INCLUDE(motors_weg_cvw300Base)

# FIND_PACKAGE(KDL)
# FIND_PACKAGE(OCL)

1,417 changes: 1,417 additions & 0 deletions Doxyfile.in

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions manifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<package>
<description brief="oroGen integration of the WEG CVW300 controller driver">
</description>

<author>Sylvain Joyeux/[email protected]</author>
<license>BSD 3-clause</license>

<depend package="drivers/motors_weg_cvw300" />
<depend package="base/orogen/types" />
<depend package="drivers/orogen/iodrivers_base" />
</package>
34 changes: 34 additions & 0 deletions motors_weg_cvw300.orogen
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name 'motors_weg_cvw300'

import_types_from 'std'
import_types_from 'base'

using_library 'motors_weg_cvw300'
import_types_from 'motors_weg_cvw300/Configuration.hpp'
import_types_from 'motors_weg_cvw300/InverterTemperatures.hpp'

using_task_library 'iodrivers_base'

task_context 'Task', subclasses: 'iodrivers_base::Task' do
needs_configuration

# Acceleration and deceleration ramps
property 'ramps', '/motors_weg_cvw300/configuration/Ramps'

# How the motor is being controlled
property 'control_method',
'/motors_weg_cvw300/configuration/ControlType', :CONTROL_ENCODER

# Settings applicable for vectorial (encoder or sensorless) method
property 'vectorial_settings',
'/motors_weg_cvw300/configuration/VectorialControlSettings'

# Limits
property 'limits', '/base/JointLimits'

# Commands
input_port 'cmd_in', '/base/commands/Joints'

# Feedback
output_port 'joint_samples', '/base/samples/Joints'
end
15 changes: 15 additions & 0 deletions motors_weg_cvw300Types.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#ifndef motors_weg_cvw300_TYPES_HPP
#define motors_weg_cvw300_TYPES_HPP

/* If you need to define types specific to your oroGen components, define them
* here. Required headers must be included explicitly
*
* However, it is common that you will only import types from your library, in
* which case you do not need this file
*/

namespace motors_weg_cvw300 {
}

#endif

25 changes: 25 additions & 0 deletions tasks/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Generated from orogen/lib/orogen/templates/tasks/CMakeLists.txt

include(motors_weg_cvw300TaskLib)
ADD_LIBRARY(${MOTORS_WEG_CVW300_TASKLIB_NAME} SHARED
${MOTORS_WEG_CVW300_TASKLIB_SOURCES})
add_dependencies(${MOTORS_WEG_CVW300_TASKLIB_NAME}
regen-typekit)


TARGET_LINK_LIBRARIES(${MOTORS_WEG_CVW300_TASKLIB_NAME}
${OrocosRTT_LIBRARIES}
${QT_LIBRARIES}
${MOTORS_WEG_CVW300_TASKLIB_DEPENDENT_LIBRARIES})
SET_TARGET_PROPERTIES(${MOTORS_WEG_CVW300_TASKLIB_NAME}
PROPERTIES LINK_INTERFACE_LIBRARIES "${MOTORS_WEG_CVW300_TASKLIB_INTERFACE_LIBRARIES}")
SET_TARGET_PROPERTIES(${MOTORS_WEG_CVW300_TASKLIB_NAME}
PROPERTIES INTERFACE_LINK_LIBRARIES "${MOTORS_WEG_CVW300_TASKLIB_INTERFACE_LIBRARIES}")

INSTALL(TARGETS ${MOTORS_WEG_CVW300_TASKLIB_NAME}
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib/orocos)

INSTALL(FILES ${MOTORS_WEG_CVW300_TASKLIB_HEADERS}
DESTINATION include/orocos/motors_weg_cvw300)

49 changes: 49 additions & 0 deletions tasks/Task.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/* Generated from orogen/lib/orogen/templates/tasks/Task.cpp */

#include "Task.hpp"

using namespace motors_weg_cvw300;

Task::Task(std::string const& name)
: TaskBase(name)
{
}

Task::~Task()
{
}



/// The following lines are template definitions for the various state machine
// hooks defined by Orocos::RTT. See Task.hpp for more detailed
// documentation about them.

bool Task::configureHook()
{
if (! TaskBase::configureHook())
return false;
return true;
}
bool Task::startHook()
{
if (! TaskBase::startHook())
return false;
return true;
}
void Task::updateHook()
{
TaskBase::updateHook();
}
void Task::errorHook()
{
TaskBase::errorHook();
}
void Task::stopHook()
{
TaskBase::stopHook();
}
void Task::cleanupHook()
{
TaskBase::cleanupHook();
}
103 changes: 103 additions & 0 deletions tasks/Task.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
/* Generated from orogen/lib/orogen/templates/tasks/Task.hpp */

#ifndef MOTORS_WEG_CVW300_TASK_TASK_HPP
#define MOTORS_WEG_CVW300_TASK_TASK_HPP

#include "motors_weg_cvw300/TaskBase.hpp"

namespace motors_weg_cvw300{

/*! \class Task
* \brief The task context provides and requires services. It uses an ExecutionEngine to perform its functions.
* Essential interfaces are operations, data flow ports and properties. These interfaces have been defined using the oroGen specification.
* In order to modify the interfaces you should (re)use oroGen and rely on the associated workflow.
*
* \details
* The name of a TaskContext is primarily defined via:
\verbatim
deployment 'deployment_name'
task('custom_task_name','motors_weg_cvw300::Task')
end
\endverbatim
* It can be dynamically adapted when the deployment is called with a prefix argument.
*/
class Task : public TaskBase
{
friend class TaskBase;
protected:



public:
/** TaskContext constructor for Task
* \param name Name of the task. This name needs to be unique to make it identifiable via nameservices.
* \param initial_state The initial TaskState of the TaskContext. Default is Stopped state.
*/
Task(std::string const& name = "motors_weg_cvw300::Task");

/** Default deconstructor of Task
*/
~Task();

/** This hook is called by Orocos when the state machine transitions
* from PreOperational to Stopped. If it returns false, then the
* component will stay in PreOperational. Otherwise, it goes into
* Stopped.
*
* It is meaningful only if the #needs_configuration has been specified
* in the task context definition with (for example):
\verbatim
task_context "TaskName" do
needs_configuration
...
end
\endverbatim
*/
bool configureHook();

/** This hook is called by Orocos when the state machine transitions
* from Stopped to Running. If it returns false, then the component will
* stay in Stopped. Otherwise, it goes into Running and updateHook()
* will be called.
*/
bool startHook();

/** This hook is called by Orocos when the component is in the Running
* state, at each activity step. Here, the activity gives the "ticks"
* when the hook should be called.
*
* The error(), exception() and fatal() calls, when called in this hook,
* allow to get into the associated RunTimeError, Exception and
* FatalError states.
*
* In the first case, updateHook() is still called, and recover() allows
* you to go back into the Running state. In the second case, the
* errorHook() will be called instead of updateHook(). In Exception, the
* component is stopped and recover() needs to be called before starting
* it again. Finally, FatalError cannot be recovered.
*/
void updateHook();

/** This hook is called by Orocos when the component is in the
* RunTimeError state, at each activity step. See the discussion in
* updateHook() about triggering options.
*
* Call recover() to go back in the Runtime state.
*/
void errorHook();

/** This hook is called by Orocos when the state machine transitions
* from Running to Stopped after stop() has been called.
*/
void stopHook();

/** This hook is called by Orocos when the state machine transitions
* from Stopped to PreOperational, requiring the call to configureHook()
* before calling start() again.
*/
void cleanupHook();
};
}

#endif

0 comments on commit 9db2535

Please sign in to comment.