Skip to content

Commit

Permalink
removed aligned velocity port
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Lehr committed Aug 15, 2014
1 parent 5a6fddd commit 327c346
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
13 changes: 2 additions & 11 deletions tasks/SingleSonarServoing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,18 +213,15 @@ void SingleSonarServoing::updateHook()

//create commnd for aligned
base::LinearAngular6DCommand alignedPositionCommand;
base::LinearAngular6DCommand alignedVelocityCommand;
base::LinearAngular6DCommand worldCommand;
alignedVelocityCommand.linear(0) = 0.0;
alignedPositionCommand.linear(0) = 0.0;
alignedPositionCommand.linear(1) = 0.0;
worldCommand.linear(2) = _fixed_depth.get();
worldCommand.angular(0) = 0.0;
worldCommand.angular(1) = 0.0;
worldCommand.angular(2) = (alignment_heading).getRad();

// write aligned position command
if (_aligned_velocity_command.connected())
_aligned_velocity_command.write(alignedVelocityCommand);

if (_aligned_position_command.connected())
_aligned_position_command.write(alignedPositionCommand);
Expand Down Expand Up @@ -489,9 +486,8 @@ void SingleSonarServoing::updateHook()

//create commnd for aligned
base::LinearAngular6DCommand alignedPositionCommand;
base::LinearAngular6DCommand alignedVelocityCommand;
base::LinearAngular6DCommand worldCommand;
alignedVelocityCommand.linear(0) = std::abs(relative_target_position.x()) < 0.001 ? 0.0 : relative_target_position.x();
alignedPositionCommand.linear(0) = std::abs(relative_target_position.x()) < 0.001 ? 0.0 : relative_target_position.x();
alignedPositionCommand.linear(1) = std::abs(relative_target_position.y()) < 0.001 ? 0.0 : relative_target_position.y();
worldCommand.linear(2) = _fixed_depth.get();
worldCommand.angular(0) = 0.0;
Expand Down Expand Up @@ -537,11 +533,6 @@ void SingleSonarServoing::updateHook()
_position_command.write(positionCommand);

// write aligned position command
if (_aligned_velocity_command.connected()){
alignedVelocityCommand.time = base::Time::now();
_aligned_velocity_command.write(alignedVelocityCommand);
}

if (_aligned_position_command.connected()){
alignedPositionCommand.time = base::Time::now();
_aligned_position_command.write(alignedPositionCommand);
Expand Down
4 changes: 1 addition & 3 deletions wall_servoing.orogen
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,8 @@ task_context "SingleSonarServoing" do

output_port('position_command', '/base/AUVPositionCommand').
doc("relativ target position and heading")
output_port('aligned_velocity_command', 'base::LinearAngular6DCommand').
doc("relativ x-speed for new control draft")
output_port('aligned_position_command', 'base::LinearAngular6DCommand').
doc("relativ target y-position for new control draft")
doc("relativ target x- and y- position for new control draft")
output_port('world_command', 'base::LinearAngular6DCommand').
doc("absolute depth, roll, pitch, and yaw for new control draft")

Expand Down

0 comments on commit 327c346

Please sign in to comment.