Skip to content

Commit

Permalink
Merge branch 'feat/bump-common-version' into fr3-develop
Browse files Browse the repository at this point in the history
  • Loading branch information
BarisYazici committed Jan 25, 2024
2 parents b661b24 + b60e9fd commit 64b0314
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 28 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# CHANGELOG

## 0.13.3 - 2024-01-18

Requires Franka Research 3 system version >= 5.5.0

* Bump libfranka-common version compatible with 5.5.0
* Delete the temporary-workaround max-path-pose deviation. Fixed in the system image.

## 0.13.2 - 2023-12-04

* Hotfix: (temporary-workaround) for max-path-pose-deviation in ExternalMode for active control.
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.4)

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")

set(libfranka_VERSION 0.13.2)
set(libfranka_VERSION 0.13.3)

project(libfranka
VERSION ${libfranka_VERSION}
Expand Down
2 changes: 1 addition & 1 deletion common
13 changes: 6 additions & 7 deletions src/robot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,12 @@ void Robot::control(std::function<Torques(const RobotState&, franka::Duration)>
double cutoff_frequency) {
std::unique_lock<std::mutex> control_lock(control_mutex_, std::try_to_lock);
assertOwningLock(control_lock);
// temporary workaround for the max_path_pose_deviation issue
limit_rate = true;
ControlLoop<JointPositions> loop(*impl_, std::move(control_callback),
[](const RobotState& robot_state, Duration) -> JointPositions {
return JointPositions(robot_state.q);
},
limit_rate, cutoff_frequency);

ControlLoop<JointVelocities> loop(*impl_, std::move(control_callback),
[](const RobotState&, Duration) -> JointVelocities {
return {{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}};
},
limit_rate, cutoff_frequency);
loop();
}

Expand Down
22 changes: 3 additions & 19 deletions src/robot_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@

#include "load_calculations.h"

#include <franka/lowpass_filter.h>
#include <franka/rate_limiting.h>

namespace franka {

namespace {
Expand Down Expand Up @@ -100,25 +97,12 @@ RobotState Robot::Impl::readOnce() {
void Robot::Impl::writeOnce(const Torques& control_input) {
research_interface::robot::ControllerCommand control_command =
createControllerCommand(control_input);
research_interface::robot::MotionGeneratorCommand command{};
double cutoff_frequency{100.0};

// Temporary workaround for the max-path-pose-deviation bug[BFFTRAC-1639]
JointVelocities motion(current_state_.dq);
command.dq_c = motion.dq;
for (size_t i = 0; i < 7; i++) {
command.dq_c[i] =
lowpassFilter(kDeltaT, command.dq_c[i], current_state_.dq_d[i], cutoff_frequency);
}
command.dq_c =
limitRate(computeUpperLimitsJointVelocity(current_state_.q_d),
computeLowerLimitsJointVelocity(current_state_.q_d), kMaxJointAcceleration,
kMaxJointJerk, command.dq_c, current_state_.dq_d, current_state_.ddq_d);
checkFinite(command.dq_c);
research_interface::robot::MotionGeneratorCommand motion_command{};
motion_command.dq_c = {0, 0, 0, 0, 0, 0, 0};

network_->tcpThrowIfConnectionClosed();

sendRobotCommand(&command, &control_command);
sendRobotCommand(&motion_command, &control_command);
}

template <typename MotionGeneratorType>
Expand Down

0 comments on commit 64b0314

Please sign in to comment.