Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
802 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
Protonek_position.configure | ||
Protonek_position.start | ||
ls | ||
Protonek_position.start | ||
Protonek_position.start | ||
cd Protonek_position | ||
ls | ||
Device | ||
Device | ||
Protonek_position.configure | ||
Protonek_position.start | ||
cd Protonek_position | ||
ls | ||
Protonek_position.configure | ||
cd Protonek_position | ||
start | ||
Protonek_position.configure | ||
cd Protonek_position | ||
start | ||
ls | ||
VelocitySetpoint_input.Set(velocity(vector(0.1,0,0),vector(0,0,0))) | ||
VelocitySetpoint_input.Set(twist(vector(0.1,0,0),vector(0,0,0))) | ||
VelocitySetpoint_input.Set(twist(vector(-0.1,0,0),vector(0,0,0))) | ||
VelocitySetpoint_input.Set(twist(vector(-0.1,0,0),vector(0,0,0.1))) | ||
VelocitySetpoint_input.Set(twist(vector(0.1,0,0),vector(0,0,0.1))) | ||
VelocitySetpoint_input.Set(twist(vector(0.0,0,0),vector(0,0,0.1))) | ||
VelocitySetpoint_input.Set(twist(vector(0.0,0,0),vector(0,0,0.0))) | ||
VelocitySetpoint_input.Set(twist(vector(0.0,0,0),vector(0,0,-0.1))) | ||
VelocitySetpoint_input.Set(twist(vector(0.0,0,0),vector(0,0,-0.0))) | ||
VelocitySetpoint_input.Set(twist(vector(0.1,0,0),vector(0,0,-0.0))) | ||
VelocitySetpoint_input.Set(twist(vector(0.1,0,0),vector(0,0,0.1))) | ||
VelocitySetpoint_input.Set(twist(vector(0.1,0,0),vector(0,0,0.0))) | ||
VelocitySetpoint_input.Set(twist(vector(0.2,0,0),vector(0,0,0.0))) | ||
VelocitySetpoint_input.Set(twist(vector(0.3,0,0),vector(0,0,0.0))) | ||
VelocitySetpoint_input.Set(twist(vector(-0.3,0,0),vector(0,0,0.0))) | ||
VelocitySetpoint_input.Set(twist(vector(-0.0,0,0),vector(0,0,0.0))) | ||
VelocitySetpoint_input.Set(twist(vector(-0.0,0,0),vector(0,0,0.4))) | ||
VelocitySetpoint_input.Set(twist(vector(-0.0,0,0),vector(0,0,0.7))) | ||
VelocitySetpoint_input.Set(twist(vector(-0.0,0,0),vector(0,0,0.9))) | ||
VelocitySetpoint_input.Set(twist(vector(-0.0,0,0),vector(0,0,0.0))) | ||
quir | ||
Protonek_position.configure | ||
Protonek_position.start | ||
cd Protonek_position | ||
VelocitySetpoint_input.Set(twist(vector(-0.0,0,0),vector(0,0,0.1))) | ||
ls | ||
Protonek_position.configure | ||
cd Protonek_position | ||
start | ||
ls | ||
ls | ||
ls | ||
VelocitySetpoint_input.Set(twist(vector(-0.0,0,0),vector(0,0,0.1))) | ||
VelocitySetpoint_input.Set(twist(vector(-0.1,0,0),vector(0,0,0.1))) | ||
ls | ||
VelocitySetpoint_input.Set(twist(vector(-0.1,0,0),vector(0,0,0.1))) | ||
VelocitySetpoint_input.Set(twist(vector(-0.3,0,0),vector(0,0,0.1))) | ||
stop | ||
start | ||
VelocitySetpoint_input.Set(twist(vector(-0.3,0,0),vector(0,0,0.1))) | ||
VelocitySetpoint_input.Set(twist(vector(-0.3,0,0),vector(0,0,0.1))) | ||
VelocitySetpoint_input.Set(twist(vector(-0.3,0,0),vector(0,0,0.1))) | ||
stop | ||
start | ||
start | ||
cd Protonek_position | ||
configure | ||
start | ||
VelocitySetpoint_input.Set(twist(vector(-0.3,0,0),vector(0,0,0.1))) | ||
cd Protonek_position | ||
configure | ||
start | ||
VelocitySetpoint_input.Set(twist(vector(-0.3,0,0),vector(0,0,0.1))) | ||
VelocitySetpoint_input.Set(twist(vector(-0.0,0,0),vector(0,0,0.0))) | ||
VelocitySetpoint_input.Set(twist(vector(0.1,0,0),vector(0,0,0.0))) | ||
VelocitySetpoint_input.Set(twist(vector(0.1,0,0),vector(0,0,0.1))) | ||
VelocitySetpoint_input.Set(twist(vector(0.0,0,0),vector(0,0,-0.1))) | ||
VelocitySetpoint_input.Set(twist(vector(0.0,0,0),vector(0,0,-0.0))) | ||
VelocitySetpoint_input.Set(twist(vector(0.3,0,0),vector(0,0,-0.0))) | ||
VelocitySetpoint_input.Set(twist(vector(0.0,0,0),vector(0,0,-0.0))) | ||
VelocitySetpoint_input.Set(twist(vector(-0.1,0,0),vector(0,0,-0.0))) | ||
VelocitySetpoint_input.Set(twist(vector(-0.0,0,0),vector(0,0,-0.0))) | ||
cd Laser_tilt | ||
ls | ||
start | ||
stop | ||
ls | ||
cd Laser_tilt | ||
start | ||
ls | ||
Setpoint_input.Set(0.1) | ||
Setpoint_input.Set(0.2) | ||
Setpoint_input.Set(0.3) | ||
Setpoint_input.Set(0.4) | ||
Setpoint_input.Set(0.6) | ||
Setpoint_input.Set(0.7) | ||
Setpoint_input.Set(0.7) | ||
Setpoint_input.Set(0.9) | ||
Setpoint_input.Set(0.0) | ||
Setpoint_input.Set(0.0) | ||
Setpoint_input.Set(0.8) | ||
Setpoint_input.Set(0.3) | ||
Setpoint_input.Set(-0.1) | ||
stop | ||
Setpoint_input.Set(0.1) | ||
start | ||
Setpoint_input.Set(-0.05) | ||
stop | ||
cd Laser_tilt | ||
star | ||
start | ||
Setpoint_input.Set(-0.1) | ||
star | ||
cd Laser_tilt | ||
start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
OPTION( BUILD_Laser_tilt "Build Laser_tilt component" ON ) | ||
|
||
if(BUILD_Laser_tilt) | ||
GLOBAL_ADD_COMPONENT(Laser_tilt ourptz.cpp Laser_tilt.cpp) | ||
endif(BUILD_Laser_tilt) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
/* | ||
* Laser_tilt.cpp | ||
* | ||
* Created on: Jan 8, 2010 | ||
* Author: konradb3 | ||
*/ | ||
|
||
#include <ocl/ComponentLoader.hpp> | ||
|
||
#include "Laser_tilt.h" | ||
|
||
namespace orocos_test | ||
{ | ||
|
||
Laser_tilt::Laser_tilt(std::string name) : | ||
TaskContext(name), | ||
setpoint_port("Setpoint_input"), | ||
position_port("Position_output"), | ||
port_prop("Device", "UNIX device file (/dev/ttySx)") | ||
{ | ||
this->ports()->addPort(&setpoint_port); | ||
this->ports()->addPort(&position_port); | ||
|
||
this->properties()->addProperty(&port_prop); | ||
} | ||
|
||
bool Laser_tilt::configureHook() | ||
{ | ||
return true; | ||
} | ||
|
||
bool Laser_tilt::startHook() | ||
{ | ||
Ourptz_settings set; | ||
set.offset = 227; | ||
set.pos_res = 1000; | ||
|
||
ptz = new Ourptz(port_prop.get().c_str() ,Ourptz_DEFAULT_BAUD ,set ); | ||
|
||
return true; | ||
} | ||
|
||
void Laser_tilt::updateHook() | ||
{ | ||
double setpoint, position; | ||
setpoint = setpoint_port.Get(); | ||
ptz->SetPos(setpoint ,false); | ||
position = ptz->GetPos(); | ||
position_port.Set(position); | ||
} | ||
|
||
void Laser_tilt::stopHook() | ||
{ | ||
delete ptz; | ||
} | ||
|
||
void Laser_tilt::cleanupHook() | ||
{ | ||
|
||
} | ||
} | ||
|
||
ORO_CREATE_COMPONENT( orocos_test::Laser_tilt ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
/* | ||
* Laser_tilt.h | ||
* | ||
* Created on: Jan 8, 2010 | ||
* Author: konradb3 | ||
*/ | ||
|
||
#ifndef LASER_TILT_H_ | ||
#define LASER_TILT_H_ | ||
|
||
#include <rtt/RTT.hpp> | ||
|
||
#include <rtt/TaskContext.hpp> | ||
#include <rtt/Ports.hpp> | ||
#include <rtt/Properties.hpp> | ||
|
||
#include "ourptz.h" | ||
|
||
namespace orocos_test | ||
{ | ||
class Laser_tilt : public RTT::TaskContext | ||
{ | ||
public: | ||
Laser_tilt(std::string name); | ||
/** | ||
* This function is for the configuration code. | ||
* Return false to abort configuration. | ||
*/ | ||
bool | ||
configureHook(); | ||
|
||
/** | ||
* This function is for the application's start up code. | ||
* Return false to abort start up. | ||
*/ | ||
bool | ||
startHook(); | ||
|
||
/** | ||
* This function is called by the Execution Engine. | ||
*/ | ||
void | ||
updateHook(); | ||
|
||
/** | ||
* This function is called when the task is stopped. | ||
*/ | ||
void | ||
stopHook(); | ||
|
||
/** | ||
* This function is called when the task is being deconfigured. | ||
*/ | ||
void | ||
cleanupHook(); | ||
|
||
protected: | ||
RTT::DataPort<double> setpoint_port; | ||
RTT::DataPort<double> position_port; | ||
RTT::Property<std::string> port_prop; | ||
private: | ||
Ourptz *ptz; | ||
}; | ||
|
||
} | ||
|
||
#endif /* LASER_TILT_H_ */ |
Oops, something went wrong.