Skip to content
This repository was archived by the owner on Dec 1, 2020. It is now read-only.

Commit 05c5f45

Browse files
committed
Add two_odrive_joints robot #2
1 parent 146fa53 commit 05c5f45

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

march_hardware_builder/include/march_hardware_builder/allowed_robot.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,13 @@ class AllowedRobot
1818
odrive_test_joint_rotational,
1919
test_joint_linear,
2020
pdb,
21+
two_odrive_joints,
2122
};
2223

2324
AllowedRobot() = default;
2425
explicit AllowedRobot(const std::string& robot_name)
2526
{
27+
ROS_WARN("Used robot %s", robot_name);
2628
if (robot_name == "march4")
2729
{
2830
this->value = march4;
@@ -39,6 +41,10 @@ class AllowedRobot
3941
{
4042
this->value = odrive_test_joint_rotational;
4143
}
44+
else if (robot_name == "two_odrive_joints")
45+
{
46+
this->value = two_odrive_joints;
47+
}
4248
else if (robot_name == "test_joint_linear")
4349
{
4450
this->value = test_joint_linear;
@@ -69,6 +75,10 @@ class AllowedRobot
6975
{
7076
return base_path.append("/robots/odrive_test_joint_rotational.yaml");
7177
}
78+
else if (this->value == AllowedRobot::two_odrive_joints)
79+
{
80+
return base_path.append("/robots/two_odrive_joints.yaml");
81+
}
7282
else if (this->value == AllowedRobot::odrive_test_joint_rotational)
7383
{
7484
return base_path.append("/robots/odrive_test_joint_rotational.yaml");

march_hardware_interface/src/march_hardware_interface.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ void MarchHardwareInterface::write(const ros::Time& /* time */, const ros::Durat
277277
}
278278
else if (joint.getActuationMode() == march::ActuationMode::torque)
279279
{
280-
joint.actuateTorque(joint_effort_command_[i]));
280+
joint.actuateTorque(joint_effort_command_[i]);
281281
}
282282
}
283283
}

0 commit comments

Comments
 (0)