Skip to content

Commit

Permalink
fix build for ubuntu 20
Browse files Browse the repository at this point in the history
  • Loading branch information
Svastits committed Feb 1, 2024
1 parent df45e1a commit b1f02b7
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,13 @@ class ControlSignal : public BaseControlSignal {
->mutable_joint_command()
->mutable_values()
->Clear();
controlling_arena_->GetMessage()
->mutable_control_signal()
->mutable_joint_command()
->mutable_values()
->Add(joint_position_values_.begin(), joint_position_values_.begin() + dof_);
for(int i = 0; i< dof_; i++){
controlling_arena_->GetMessage()
->mutable_control_signal()
->mutable_joint_command()
->mutable_values()
->Add(joint_position_values_[i]);
}
}

if (this->has_torques_) {
Expand All @@ -108,11 +110,13 @@ class ControlSignal : public BaseControlSignal {
->mutable_joint_torque_command()
->mutable_values()
->Clear();
controlling_arena_->GetMessage()
->mutable_control_signal()
->mutable_joint_torque_command()
->mutable_values()
->Add(joint_torque_values_.begin(), joint_torque_values_.begin() + dof_);
for(int i = 0; i< dof_; i++){
controlling_arena_->GetMessage()
->mutable_control_signal()
->mutable_joint_torque_command()
->mutable_values()
->Add(joint_torque_values_[i]);
}
}

if (this->has_velocities_) {
Expand All @@ -121,11 +125,13 @@ class ControlSignal : public BaseControlSignal {
->mutable_joint_velocity_command()
->mutable_values()
->Clear();
controlling_arena_->GetMessage()
->mutable_control_signal()
->mutable_joint_velocity_command()
->mutable_values()
->Add(joint_velocity_values_.begin(), joint_velocity_values_.begin() + dof_);
for(int i = 0; i< dof_; i++){
controlling_arena_->GetMessage()
->mutable_control_signal()
->mutable_joint_velocity_command()
->mutable_values()
->Add(joint_velocity_values_[i]);
}
}

if (this->has_stiffness_and_damping) {
Expand All @@ -134,25 +140,25 @@ class ControlSignal : public BaseControlSignal {
->mutable_joint_attributes()
->mutable_stiffness()
->Clear();
controlling_arena_->GetMessage()
->mutable_control_signal()
->mutable_joint_attributes()
->mutable_stiffness()
->Add(joint_impedance_stiffness_values_.begin(),
joint_impedance_stiffness_values_.begin() + dof_);

controlling_arena_->GetMessage()
->mutable_control_signal()
->mutable_joint_attributes()
->mutable_damping()
->Clear();

controlling_arena_->GetMessage()
->mutable_control_signal()
->mutable_joint_attributes()
->mutable_damping()
->Add(joint_impedance_damping_values_.begin(),
joint_impedance_damping_values_.begin() + dof_);
for(int i = 0; i< dof_; i++){
controlling_arena_->GetMessage()
->mutable_control_signal()
->mutable_joint_attributes()
->mutable_stiffness()
->Add(joint_impedance_stiffness_values_[i]);
controlling_arena_->GetMessage()
->mutable_control_signal()
->mutable_joint_attributes()
->mutable_damping()
->Add(joint_impedance_damping_values_[i]);
}
}

return controlling_arena_->GetMessage();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
// Copyright (C) KUKA. All Rights Reserved.

syntax = "proto3";
option cc_enable_arenas = true;

package kuka.ecs.v1;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
// Copyright (C) KUKA. All Rights Reserved.

syntax = "proto3";
option cc_enable_arenas = true;

package kuka.ecs.v1;

Expand Down
12 changes: 5 additions & 7 deletions kuka-external-control-sdk/iiqka/src/robot.cc
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,13 @@ OperationStatus Robot::SetQoSProfile(QoS_Configuration qos_config) {

request.add_qos_profiles();

request.mutable_qos_profiles()
->at(0)
.mutable_rt_packet_loss_profile()
request.mutable_qos_profiles(0)
->mutable_rt_packet_loss_profile()
->set_consequent_lost_packets(qos_config.consecutive_packet_loss_limit);
request.mutable_qos_profiles()
->at(0)
.mutable_rt_packet_loss_profile()
request.mutable_qos_profiles(0)
->mutable_rt_packet_loss_profile()
->set_lost_packets_in_timeframe(qos_config.packet_loss_in_timeframe_limit);
request.mutable_qos_profiles()->at(0).mutable_rt_packet_loss_profile()->set_timeframe_ms(
request.mutable_qos_profiles(0)->mutable_rt_packet_loss_profile()->set_timeframe_ms(
qos_config.timeframe_ms);

return OperationStatus(stub_->SetQoSProfile(&context, request, &response));
Expand Down

0 comments on commit b1f02b7

Please sign in to comment.