Skip to content
This repository has been archived by the owner on Jan 23, 2024. It is now read-only.

Commit

Permalink
Compiling version
Browse files Browse the repository at this point in the history
  • Loading branch information
Flova committed Sep 29, 2023
1 parent ba13aad commit 45e252e
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"files.associations": {
"chrono": "cpp"
"chrono": "cpp",
"system_error": "cpp"
}
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#ifndef BITBOTS_ROS_CONTROL_INCLUDE_BITBOTS_ROS_CONTROL_DYNAMIXEL_SERVO_HARDWARE_INTERFACE_H_
#define BITBOTS_ROS_CONTROL_INCLUDE_BITBOTS_ROS_CONTROL_DYNAMIXEL_SERVO_HARDWARE_INTERFACE_H_

#include <bitbots_ros_control/utils.h>
#include <dynamixel_driver.h>

#include <bitbots_msgs/msg/joint_command.hpp>
#include <bitbots_msgs/msg/joint_torque.hpp>
#include <bitbots_ros_control/hardware_interface.hpp>
#include <bitbots_ros_control/servo_bus_interface.hpp>
#include <bitbots_ros_control/utils.hpp>
#include <bitset>
#include <diagnostic_msgs/msg/diagnostic_array.hpp>
#include <diagnostic_msgs/msg/diagnostic_status.hpp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

#ifndef BITBOTS_ROS_CONTROL_INCLUDE_BITBOTS_ROS_CONTROL_HARDWARE_INTERFACE_H_
#define BITBOTS_ROS_CONTROL_INCLUDE_BITBOTS_ROS_CONTROL_HARDWARE_INTERFACE_H_
#include <rclcpp/rclcpp.hpp>

namespace bitbots_ros_control {

class HardwareInterface {
Expand Down
6 changes: 3 additions & 3 deletions bitbots_ros_control/include/bitbots_ros_control/utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ namespace bitbots_ros_control {

enum ControlMode { POSITION_CONTROL, VELOCITY_CONTROL, EFFORT_CONTROL, CURRENT_BASED_POSITION_CONTROL };

bool stringToControlMode(rclcpp::Node::SharedPtr nh, std::string control_modestr, ControlMode &control_mode);
void speakError(rclcpp::Publisher<humanoid_league_msgs::msg::Audio>::SharedPtr speak_pub, std::string text);
bool stringToControlMode(rclcpp::Node::SharedPtr nh, const std::string& control_modestr, ControlMode& control_mode);
void speakError(rclcpp::Publisher<humanoid_league_msgs::msg::Audio>::SharedPtr speak_pub, const std::string& text);

uint16_t dxlMakeword(uint64_t a, uint64_t b);
uint32_t dxlMakedword(uint64_t a, uint64_t b);
float dxlMakeFloat(uint8_t *data);
float dxlMakeFloat(uint8_t* data);

std::string gyroRangeToString(uint8_t range);
std::string accelRangeToString(uint8_t range);
Expand Down
2 changes: 1 addition & 1 deletion bitbots_ros_control/src/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ int main(int argc, char *argv[]) {
status.level = diagnostic_msgs::msg::DiagnosticStatus::WARN;
status.message = "Bus runs not at specified frequency";
}
array = std::vector<diagnostic_msgs::msg::DiagnosticStatus>();
std::vector array = std::vector<diagnostic_msgs::msg::DiagnosticStatus>();
array.push_back(status);
array_msg.status = array;
diagnostic_pub->publish(array_msg);
Expand Down

0 comments on commit 45e252e

Please sign in to comment.