Skip to content

Commit 47bd4e7

Browse files
committed
REVERT_ME: Switch version checks to 5.22.0 as that't the beta version
Without this, the features will not work for beta users. Once 5.23.0 is released, we revert this commit to get the correct feature check.
1 parent 59375ed commit 47bd4e7

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

examples/pd_controller_example.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ int main(int argc, char* argv[])
187187

188188
{
189189
auto robot_version = g_my_robot->getUrDriver()->getVersion();
190-
if (robot_version < urcl::VersionInformation::fromString("5.23.0") ||
190+
if (robot_version < urcl::VersionInformation::fromString("5.22.0") || // ToDo: Increase to 5.23.0 once released
191191
(robot_version.major > 5 && robot_version < urcl::VersionInformation::fromString("10.10.0")))
192192
{
193193
URCL_LOG_ERROR("This example requires a robot with at least version 5.23.0 / 10.10.0. Your robot has version %s.",

examples/torque_control.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ int main(int argc, char* argv[])
6767
// software versions.
6868
{
6969
auto robot_version = g_my_robot->getUrDriver()->getVersion();
70-
if (robot_version < urcl::VersionInformation::fromString("5.23.0") ||
70+
// ToDo: Increase to 5.23.0 once released
71+
if (robot_version < urcl::VersionInformation::fromString("5.22.0") ||
7172
(robot_version.major > 5 && robot_version < urcl::VersionInformation::fromString("10.10.0")))
7273
{
7374
URCL_LOG_ERROR("This example requires a robot with at least version 5.23.0 / 10.10.0. Your robot has version %s.",

resources/external_control.urscript

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ thread torqueThread():
270270
textmsg("ExternalControl: Starting torque thread")
271271
while control_mode == MODE_TORQUE:
272272
torque = cmd_torque
273-
{% if ROBOT_SOFTWARE_VERSION >= v5.23.0 %}
273+
{% if ROBOT_SOFTWARE_VERSION >= v5.22.0 %} # ToDo: Increase to 5.23.0 once released
274274
{% if ROBOT_SOFTWARE_VERSION < v6.0.0 %}
275275
torque_command(torque, friction_comp=friction_compensation_enabled)
276276
{% elif ROBOT_SOFTWARE_VERSION >= v10.10.0 %}
@@ -688,7 +688,7 @@ end
688688
thread PDControlThread():
689689
while control_mode == MODE_PD_CONTROLLER_JOINT or control_mode == MODE_PD_CONTROLLER_TASK:
690690
local q_err = cmd_servo_q - get_actual_joint_positions()
691-
{% if ROBOT_SOFTWARE_VERSION >= v5.23.0 %}
691+
{% if ROBOT_SOFTWARE_VERSION >= v5.22.0 %} # ToDo: Increase to 5.23.0 once released
692692
{% if ROBOT_SOFTWARE_VERSION < v6.0.0 %}
693693
local tau = pd_controller_gains.kp * q_err - pd_controller_gains.kd * get_actual_joint_speeds()
694694
tau = clamp_array(tau, max_joint_torques)

src/control/script_command_interface.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,8 @@ bool ScriptCommandInterface::endToolContact()
228228

229229
bool ScriptCommandInterface::setFrictionCompensation(const bool friction_compensation_enabled)
230230
{
231-
robotVersionSupportsCommandOrWarn(urcl::VersionInformation::fromString("5.23.0"),
231+
// ToDo: Increase to 5.23.0 once released
232+
robotVersionSupportsCommandOrWarn(urcl::VersionInformation::fromString("5.22.0"),
232233
urcl::VersionInformation::fromString("10.10.0"), __func__);
233234
const int message_length = 2;
234235
uint8_t buffer[sizeof(int32_t) * MAX_MESSAGE_LENGTH];
@@ -253,7 +254,8 @@ bool ScriptCommandInterface::setFrictionCompensation(const bool friction_compens
253254

254255
bool ScriptCommandInterface::setPDControllerGains(const urcl::vector6d_t* kp, const urcl::vector6d_t* kd)
255256
{
256-
robotVersionSupportsCommandOrWarn(urcl::VersionInformation::fromString("5.23.0"),
257+
// ToDo: Increase to 5.23.0 once released
258+
robotVersionSupportsCommandOrWarn(urcl::VersionInformation::fromString("5.22.0"),
257259
urcl::VersionInformation::fromString("10.10.0"), __func__);
258260
const int message_length = 13;
259261
uint8_t buffer[sizeof(int32_t) * MAX_MESSAGE_LENGTH];
@@ -287,7 +289,8 @@ bool ScriptCommandInterface::setPDControllerGains(const urcl::vector6d_t* kp, co
287289

288290
bool ScriptCommandInterface::setMaxJointTorques(const urcl::vector6d_t* max_joint_torques)
289291
{
290-
robotVersionSupportsCommandOrWarn(urcl::VersionInformation::fromString("5.23.0"),
292+
// ToDo: Increase to 5.23.0 once released
293+
robotVersionSupportsCommandOrWarn(urcl::VersionInformation::fromString("5.22.0"),
291294
urcl::VersionInformation::fromString("10.10.0"), __func__);
292295
const int message_length = 7;
293296
uint8_t buffer[sizeof(int32_t) * MAX_MESSAGE_LENGTH];

0 commit comments

Comments
 (0)