Skip to content

Commit

Permalink
Merge pull request #8 from mabrobotics/devel
Browse files Browse the repository at this point in the history
Devel to main
  • Loading branch information
klonyyy committed Feb 2, 2024
2 parents 7c0dd49 + fff8c1c commit 957fb87
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "candle"]
path = candle
url = git@github.com:mabrobotics/candle.git
url = https://github.com/mabrobotics/candle.git
10 changes: 5 additions & 5 deletions src/md80_node.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "md80_node.hpp"

const std::string version = "v1.3.0";
const std::string version = "v1.3.2";

Md80Node::Md80Node(int argc, char** argv) : Node("candle_ros2_node")
{
Expand Down Expand Up @@ -191,8 +191,8 @@ void Md80Node::service_setModeMd80(const std::shared_ptr<candle_ros2::srv::SetMo
mode = mab::Md80Mode_E::POSITION_PID;
else if (request->mode[i] == "VELOCITY_PID")
mode = mab::Md80Mode_E::VELOCITY_PID;
else if (request->mode[i] == "DEPRECATED")
mode = mab::Md80Mode_E::DEPRECATED;
else if (request->mode[i] == "RAW_TORQUE")
mode = mab::Md80Mode_E::RAW_TORQUE;
else
{
RCLCPP_WARN(this->get_logger(), "MODE %s not recognized, setting IDLE for driveID = %d", request->mode[i].c_str(), request->drive_ids[i]);
Expand Down Expand Up @@ -309,7 +309,7 @@ void Md80Node::motionCommandCallback(const std::shared_ptr<candle_ros2::msg::Mot
auto& md = candle->getMd80FromList(msg->drive_ids[i]);
md.setTargetPosition(msg->target_position[i]);
md.setTargetVelocity(msg->target_velocity[i]);
md.setTorque(msg->target_torque[i]);
md.setTargetTorque(msg->target_torque[i]);
}
else
RCLCPP_WARN(this->get_logger(), "Drive with ID: %d is not added!", msg->drive_ids[i]);
Expand Down Expand Up @@ -390,7 +390,7 @@ void Md80Node::positionCommandCallback(const std::shared_ptr<candle_ros2::msg::P
{
auto& md = candle->getMd80FromList(msg->drive_ids[i]);
md.setPositionControllerParams(msg->position_pid[i].kp, msg->position_pid[i].ki, msg->position_pid[i].kd, msg->position_pid[i].i_windup);
md.setMaxVelocity(msg->position_pid[i].max_output);
md.setProfileVelocity(msg->position_pid[i].max_output);
if (i < (int)msg->velocity_pid.size())
{
md.setVelocityControllerParams(msg->velocity_pid[i].kp, msg->velocity_pid[i].ki, msg->velocity_pid[i].kd, msg->velocity_pid[i].i_windup);
Expand Down

0 comments on commit 957fb87

Please sign in to comment.