latest pushes

This commit is contained in:
Ronaldson Bellande 2023-09-28 09:50:36 -04:00
parent 254f5c0e6d
commit cb36d36334
71 changed files with 304 additions and 160 deletions

View File

@ -1 +0,0 @@
- git: {local-name: robotis_controller_msgs, uri: 'https://github.com/Robotics-Sensors/ROBOTIS-Framework-msgs.git', version: noetic}

View File

@ -18,7 +18,7 @@ notifications:
- ronaldsonbellande@gmail.com
env:
matrix:
- ROS_DISTRO=noetic ROS_REPO=ros-shadow-fixed UPSTREAM_WORKSPACE=file OS_NAME=ubuntu OS_CODE_NAME=focal $ROSINSTALL_FILENAME=".robotis_framework.rosinstall"
- ROS_DISTRO=noetic ROS_REPO=ros-shadow-fixed UPSTREAM_WORKSPACE=file OS_NAME=ubuntu OS_CODE_NAME=focal $ROSINSTALL_FILENAME=".humanoid_robot_framework.rosinstall"
branches:
only:
- master

31
fix_errors.sh Executable file
View File

@ -0,0 +1,31 @@
#!/bin/bash
# Get the URL from .git/config
git_url=$(git config --get remote.origin.url)
# Check if a URL is found
if [ -z "$git_url" ]; then
echo "No remote URL found in .git/config."
exit 1
fi
# Clone the repository into a temporary folder
git clone "$git_url" tmp_clone
# Check if the clone was successful
if [ $? -eq 0 ]; then
# Remove the existing .git directory if it exists
if [ -d ".git" ]; then
rm -rf .git
fi
# Copy the .git directory from the clone to the current repository
cp -r tmp_clone/.git .
# Remove the clone directory
rm -rf tmp_clone
echo "Repository cloned and .git directory copied successfully."
else
echo "Failed to clone the repository."
fi

View File

@ -1,5 +1,5 @@
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Changelog for package robotis_controller
Changelog for package humanoid_robot_controller
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
0.3.1 (2023-09-27)
@ -63,7 +63,7 @@ Changelog for package robotis_controller
0.2.2 (2017-04-24)
------------------
* updated robotis_controller.cpp
* updated humanoid_robot_controller.cpp
* changed to read control cycle from .robot file
* Contributors: Zerom
@ -76,7 +76,7 @@ Changelog for package robotis_controller
* - added WriteControlTable msg callback
* mode change debugging
* - optimized cpu usage by spin loop (by astumpf)
* - robotis_controller process() : processing order changed.
* - humanoid_robot_controller process() : processing order changed.
* 1st : packet communication
* 2nd : processing modules
* - dependencies fixed. (Pull requests `#26 <https://github.com/ROBOTIS-GIT/ROBOTIS-Framework/issues/26>`_)

View File

@ -2,7 +2,7 @@
# Set minimum required version of cmake, project name and compile options
################################################################################
cmake_minimum_required(VERSION 3.0.2)
project(robotis_controller)
project(humanoid_robot_controller)
## Compile as C++11, supported in ROS Kinetic and newer
add_compile_options(-std=c++11)
@ -15,10 +15,10 @@ find_package(catkin REQUIRED COMPONENTS
roslib
std_msgs
sensor_msgs
robotis_controller_msgs
humanoid_robot_controller_msgs
dynamixel_sdk
robotis_device
robotis_framework_common
humanoid_robot_device
humanoid_robot_framework_common
cmake_modules
)
@ -59,16 +59,16 @@ endif(NOT ${YAML_CPP_VERSION} VERSION_LESS "0.5")
################################################################################
catkin_package(
INCLUDE_DIRS include
LIBRARIES robotis_controller
LIBRARIES humanoid_robot_controller
CATKIN_DEPENDS
roscpp
roslib
std_msgs
sensor_msgs
robotis_controller_msgs
humanoid_robot_controller_msgs
dynamixel_sdk
robotis_device
robotis_framework_common
humanoid_robot_device
humanoid_robot_framework_common
cmake_modules
DEPENDS Boost
)
@ -83,14 +83,14 @@ include_directories(
${YAML_CPP_INCLUDE_DIRS}
)
add_library(robotis_controller src/robotis_controller/robotis_controller.cpp)
add_dependencies(robotis_controller ${catkin_EXPORTED_TARGETS})
target_link_libraries(robotis_controller ${catkin_LIBRARIES} ${Boost_LIBRARIES} ${YAML_CPP_LIBRARIES})
add_library(humanoid_robot_controller src/humanoid_robot_controller/humanoid_robot_controller.cpp)
add_dependencies(humanoid_robot_controller ${catkin_EXPORTED_TARGETS})
target_link_libraries(humanoid_robot_controller ${catkin_LIBRARIES} ${Boost_LIBRARIES} ${YAML_CPP_LIBRARIES})
################################################################################
# Install
################################################################################
install(TARGETS robotis_controller
install(TARGETS humanoid_robot_controller
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}

View File

@ -15,7 +15,7 @@
*******************************************************************************/
/*
* robotis_controller.h
* humanoid_robot_controller.h
*
* Created on: 2016. 1. 15.
* Author: zerom
@ -32,21 +32,21 @@
#include <std_msgs/String.h>
#include <yaml-cpp/yaml.h>
#include "robotis_controller_msgs/GetJointModule.h"
#include "robotis_controller_msgs/JointCtrlModule.h"
#include "robotis_controller_msgs/LoadOffset.h"
#include "robotis_controller_msgs/SetJointModule.h"
#include "robotis_controller_msgs/SetModule.h"
#include "robotis_controller_msgs/SyncWriteItem.h"
#include "robotis_controller_msgs/WriteControlTable.h"
#include "humanoid_robot_controller_msgs/GetJointModule.h"
#include "humanoid_robot_controller_msgs/JointCtrlModule.h"
#include "humanoid_robot_controller_msgs/LoadOffset.h"
#include "humanoid_robot_controller_msgs/SetJointModule.h"
#include "humanoid_robot_controller_msgs/SetModule.h"
#include "humanoid_robot_controller_msgs/SyncWriteItem.h"
#include "humanoid_robot_controller_msgs/WriteControlTable.h"
#include "dynamixel_sdk/group_bulk_read.h"
#include "dynamixel_sdk/group_sync_write.h"
#include "robotis_device/robot.h"
#include "robotis_framework_common/motion_module.h"
#include "robotis_framework_common/sensor_module.h"
#include "humanoid_robot_device/robot.h"
#include "humanoid_robot_framework_common/motion_module.h"
#include "humanoid_robot_framework_common/sensor_module.h"
namespace robotis_framework {
namespace humanoid_robot_framework {
enum ControllerMode { MotionModuleMode, DirectControlMode };
@ -75,7 +75,7 @@ private:
void msgQueueThread();
void setCtrlModuleThread(std::string ctrl_module);
void setJointCtrlModuleThread(
const robotis_controller_msgs::JointCtrlModule::ConstPtr &msg);
const humanoid_robot_controller_msgs::JointCtrlModule::ConstPtr &msg);
bool isTimerStopped();
void initializeSyncWrite();
@ -143,25 +143,25 @@ public:
/* ROS Topic Callback Functions */
void writeControlTableCallback(
const robotis_controller_msgs::WriteControlTable::ConstPtr &msg);
const humanoid_robot_controller_msgs::WriteControlTable::ConstPtr &msg);
void syncWriteItemCallback(
const robotis_controller_msgs::SyncWriteItem::ConstPtr &msg);
const humanoid_robot_controller_msgs::SyncWriteItem::ConstPtr &msg);
void setControllerModeCallback(const std_msgs::String::ConstPtr &msg);
void setJointStatesCallback(const sensor_msgs::JointState::ConstPtr &msg);
void setJointCtrlModuleCallback(
const robotis_controller_msgs::JointCtrlModule::ConstPtr &msg);
const humanoid_robot_controller_msgs::JointCtrlModule::ConstPtr &msg);
void setCtrlModuleCallback(const std_msgs::String::ConstPtr &msg);
void enableOffsetCallback(const std_msgs::Bool::ConstPtr &msg);
bool getJointCtrlModuleService(
robotis_controller_msgs::GetJointModule::Request &req,
robotis_controller_msgs::GetJointModule::Response &res);
humanoid_robot_controller_msgs::GetJointModule::Request &req,
humanoid_robot_controller_msgs::GetJointModule::Response &res);
bool setJointCtrlModuleService(
robotis_controller_msgs::SetJointModule::Request &req,
robotis_controller_msgs::SetJointModule::Response &res);
bool setCtrlModuleService(robotis_controller_msgs::SetModule::Request &req,
robotis_controller_msgs::SetModule::Response &res);
bool loadOffsetService(robotis_controller_msgs::LoadOffset::Request &req,
robotis_controller_msgs::LoadOffset::Response &res);
humanoid_robot_controller_msgs::SetJointModule::Request &req,
humanoid_robot_controller_msgs::SetJointModule::Response &res);
bool setCtrlModuleService(humanoid_robot_controller_msgs::SetModule::Request &req,
humanoid_robot_controller_msgs::SetModule::Response &res);
bool loadOffsetService(humanoid_robot_controller_msgs::LoadOffset::Request &req,
humanoid_robot_controller_msgs::LoadOffset::Response &res);
void gazeboJointStatesCallback(const sensor_msgs::JointState::ConstPtr &msg);
@ -202,6 +202,6 @@ public:
uint8_t *data, uint8_t *error = 0);
};
} // namespace robotis_framework
} // namespace humanoid_robot_framework
#endif /* ROBOTIS_CONTROLLER_ROBOTIS_CONTROLLER_H_ */

View File

@ -1,8 +1,8 @@
<?xml version="1.0"?>
<package format="2">
<name>robotis_controller</name>
<name>humanoid_robot_controller</name>
<version>0.3.0</version>
<description>robotis_controller package for ROBOTIS's platform like Manipulator-H, THORMANG and OP series</description>
<description>humanoid_robot_controller package for ROBOTIS's platform like Manipulator-H, THORMANG and OP series</description>
<license>Apache 2.0</license>
<maintainer email="ronaldsonbellande@gmail.com">Ronaldson Bellande</maintainer>
@ -12,10 +12,10 @@
<build_depend>roslib</build_depend>
<build_depend>std_msgs</build_depend>
<build_depend>sensor_msgs</build_depend>
<build_depend>robotis_controller_msgs</build_depend>
<build_depend>humanoid_robot_controller_msgs</build_depend>
<build_depend>dynamixel_sdk</build_depend>
<build_depend>robotis_device</build_depend>
<build_depend>robotis_framework_common</build_depend>
<build_depend>humanoid_robot_device</build_depend>
<build_depend>humanoid_robot_framework_common</build_depend>
<build_depend>cmake_modules</build_depend>
<build_depend>yaml-cpp</build_depend>
@ -23,10 +23,10 @@
<build_export_depend>roslib</build_export_depend>
<build_export_depend>std_msgs</build_export_depend>
<build_export_depend>sensor_msgs</build_export_depend>
<build_export_depend>robotis_controller_msgs</build_export_depend>
<build_export_depend>humanoid_robot_controller_msgs</build_export_depend>
<build_export_depend>dynamixel_sdk</build_export_depend>
<build_export_depend>robotis_device</build_export_depend>
<build_export_depend>robotis_framework_common</build_export_depend>
<build_export_depend>humanoid_robot_device</build_export_depend>
<build_export_depend>humanoid_robot_framework_common</build_export_depend>
<build_export_depend>cmake_modules</build_export_depend>
<build_export_depend>yaml-cpp</build_export_depend>
@ -34,10 +34,10 @@
<exec_depend>roslib</exec_depend>
<exec_depend>std_msgs</exec_depend>
<exec_depend>sensor_msgs</exec_depend>
<exec_depend>robotis_controller_msgs</exec_depend>
<exec_depend>humanoid_robot_controller_msgs</exec_depend>
<exec_depend>dynamixel_sdk</exec_depend>
<exec_depend>robotis_device</exec_depend>
<exec_depend>robotis_framework_common</exec_depend>
<exec_depend>humanoid_robot_device</exec_depend>
<exec_depend>humanoid_robot_framework_common</exec_depend>
<exec_depend>cmake_modules</exec_depend>
<exec_depend>yaml-cpp</exec_depend>

View File

@ -15,7 +15,7 @@
*******************************************************************************/
/*
* robotis_controller.cpp
* humanoid_robot_controller.cpp
*
* Created on: 2016. 1. 15.
* Author: zerom
@ -24,9 +24,9 @@
#include <ros/package.h>
#include <ros/callback_queue.h>
#include "robotis_controller/robotis_controller.h"
#include "humanoid_robot_controller/humanoid_robot_controller.h"
using namespace robotis_framework;
using namespace humanoid_robot_framework;
RobotisController::RobotisController()
: is_timer_running_(false),
@ -39,7 +39,7 @@ RobotisController::RobotisController()
DEBUG_PRINT(false),
robot_(0),
gazebo_mode_(false),
gazebo_robot_name_("robotis")
gazebo_robot_name_("humanoid_robot")
{
direct_sync_write_.clear();
}
@ -198,7 +198,7 @@ void RobotisController::initializeSyncWrite()
bool RobotisController::initialize(const std::string robot_file_path, const std::string init_file_path)
{
std::string dev_desc_dir_path = ros::package::getPath("robotis_device") + "/devices";
std::string dev_desc_dir_path = ros::package::getPath("humanoid_robot_device") + "/devices";
// load robot info : port , device
robot_ = new Robot(robot_file_path, dev_desc_dir_path);
@ -639,19 +639,19 @@ void RobotisController::msgQueueThread()
ros_node.setCallbackQueue(&callback_queue);
/* subscriber */
ros::Subscriber write_control_table_sub = ros_node.subscribe("/robotis/write_control_table", 5,
ros::Subscriber write_control_table_sub = ros_node.subscribe("/humanoid_robot/write_control_table", 5,
&RobotisController::writeControlTableCallback, this);
ros::Subscriber sync_write_item_sub = ros_node.subscribe("/robotis/sync_write_item", 10,
ros::Subscriber sync_write_item_sub = ros_node.subscribe("/humanoid_robot/sync_write_item", 10,
&RobotisController::syncWriteItemCallback, this);
ros::Subscriber joint_ctrl_modules_sub = ros_node.subscribe("/robotis/set_joint_ctrl_modules", 10,
ros::Subscriber joint_ctrl_modules_sub = ros_node.subscribe("/humanoid_robot/set_joint_ctrl_modules", 10,
&RobotisController::setJointCtrlModuleCallback, this);
ros::Subscriber enable_ctrl_module_sub = ros_node.subscribe("/robotis/enable_ctrl_module", 10,
ros::Subscriber enable_ctrl_module_sub = ros_node.subscribe("/humanoid_robot/enable_ctrl_module", 10,
&RobotisController::setCtrlModuleCallback, this);
ros::Subscriber control_mode_sub = ros_node.subscribe("/robotis/set_control_mode", 10,
ros::Subscriber control_mode_sub = ros_node.subscribe("/humanoid_robot/set_control_mode", 10,
&RobotisController::setControllerModeCallback, this);
ros::Subscriber joint_states_sub = ros_node.subscribe("/robotis/set_joint_states", 10,
ros::Subscriber joint_states_sub = ros_node.subscribe("/humanoid_robot/set_joint_states", 10,
&RobotisController::setJointStatesCallback, this);
ros::Subscriber enable_offset_sub = ros_node.subscribe("/robotis/enable_offset", 10,
ros::Subscriber enable_offset_sub = ros_node.subscribe("/humanoid_robot/enable_offset", 10,
&RobotisController::enableOffsetCallback, this);
ros::Subscriber gazebo_joint_states_sub;
@ -660,10 +660,10 @@ void RobotisController::msgQueueThread()
&RobotisController::gazeboJointStatesCallback, this);
/* publisher */
goal_joint_state_pub_ = ros_node.advertise<sensor_msgs::JointState>("/robotis/goal_joint_states", 10);
present_joint_state_pub_ = ros_node.advertise<sensor_msgs::JointState>("/robotis/present_joint_states", 10);
current_module_pub_ = ros_node.advertise<robotis_controller_msgs::JointCtrlModule>(
"/robotis/present_joint_ctrl_modules", 10);
goal_joint_state_pub_ = ros_node.advertise<sensor_msgs::JointState>("/humanoid_robot/goal_joint_states", 10);
present_joint_state_pub_ = ros_node.advertise<sensor_msgs::JointState>("/humanoid_robot/present_joint_states", 10);
current_module_pub_ = ros_node.advertise<humanoid_robot_controller_msgs::JointCtrlModule>(
"/humanoid_robot/present_joint_ctrl_modules", 10);
if (gazebo_mode_ == true)
{
@ -679,13 +679,13 @@ void RobotisController::msgQueueThread()
}
/* service */
ros::ServiceServer get_joint_module_server = ros_node.advertiseService("/robotis/get_present_joint_ctrl_modules",
ros::ServiceServer get_joint_module_server = ros_node.advertiseService("/humanoid_robot/get_present_joint_ctrl_modules",
&RobotisController::getJointCtrlModuleService, this);
ros::ServiceServer set_joint_module_server = ros_node.advertiseService("/robotis/set_present_joint_ctrl_modules",
ros::ServiceServer set_joint_module_server = ros_node.advertiseService("/humanoid_robot/set_present_joint_ctrl_modules",
&RobotisController::setJointCtrlModuleService, this);
ros::ServiceServer set_module_server = ros_node.advertiseService("/robotis/set_present_ctrl_modules",
ros::ServiceServer set_module_server = ros_node.advertiseService("/humanoid_robot/set_present_ctrl_modules",
&RobotisController::setCtrlModuleService, this);
ros::ServiceServer load_offset_server = ros_node.advertiseService("/robotis/load_offset",
ros::ServiceServer load_offset_server = ros_node.advertiseService("/humanoid_robot/load_offset",
&RobotisController::loadOffsetService, this);
ros::WallDuration duration(robot_->getControlCycle() / 1000.0);
@ -1568,7 +1568,7 @@ void RobotisController::removeSensorModule(SensorModule *module)
sensor_modules_.remove(module);
}
void RobotisController::writeControlTableCallback(const robotis_controller_msgs::WriteControlTable::ConstPtr &msg)
void RobotisController::writeControlTableCallback(const humanoid_robot_controller_msgs::WriteControlTable::ConstPtr &msg)
{
Device *device = NULL;
@ -1626,7 +1626,7 @@ void RobotisController::writeControlTableCallback(const robotis_controller_msgs:
}
void RobotisController::syncWriteItemCallback(const robotis_controller_msgs::SyncWriteItem::ConstPtr &msg)
void RobotisController::syncWriteItemCallback(const humanoid_robot_controller_msgs::SyncWriteItem::ConstPtr &msg)
{
for (int i = 0; i < msg->joint_name.size(); i++)
{
@ -1786,7 +1786,7 @@ void RobotisController::setCtrlModule(std::string module_name)
set_module_thread_ = boost::thread(boost::bind(&RobotisController::setCtrlModuleThread, this, module_name));
}
void RobotisController::setJointCtrlModuleCallback(const robotis_controller_msgs::JointCtrlModule::ConstPtr &msg)
void RobotisController::setJointCtrlModuleCallback(const humanoid_robot_controller_msgs::JointCtrlModule::ConstPtr &msg)
{
if (msg->joint_name.size() != msg->module_name.size())
return;
@ -1806,8 +1806,8 @@ void RobotisController::enableOffsetCallback(const std_msgs::Bool::ConstPtr &msg
offset_ratio_ = 1.0;
}
bool RobotisController::getJointCtrlModuleService(robotis_controller_msgs::GetJointModule::Request &req,
robotis_controller_msgs::GetJointModule::Response &res)
bool RobotisController::getJointCtrlModuleService(humanoid_robot_controller_msgs::GetJointModule::Request &req,
humanoid_robot_controller_msgs::GetJointModule::Response &res)
{
for (unsigned int idx = 0; idx < req.joint_name.size(); idx++)
{
@ -1825,16 +1825,16 @@ bool RobotisController::getJointCtrlModuleService(robotis_controller_msgs::GetJo
return true;
}
bool RobotisController::setJointCtrlModuleService(robotis_controller_msgs::SetJointModule::Request &req, robotis_controller_msgs::SetJointModule::Response &res)
bool RobotisController::setJointCtrlModuleService(humanoid_robot_controller_msgs::SetJointModule::Request &req, humanoid_robot_controller_msgs::SetJointModule::Response &res)
{
if(set_module_thread_.joinable())
set_module_thread_.join();
robotis_controller_msgs::JointCtrlModule modules;
humanoid_robot_controller_msgs::JointCtrlModule modules;
modules.joint_name = req.joint_name;
modules.module_name = req.module_name;
robotis_controller_msgs::JointCtrlModule::ConstPtr msg_ptr(new robotis_controller_msgs::JointCtrlModule(modules));
humanoid_robot_controller_msgs::JointCtrlModule::ConstPtr msg_ptr(new humanoid_robot_controller_msgs::JointCtrlModule(modules));
if (modules.joint_name.size() != modules.module_name.size())
return false;
@ -1846,7 +1846,7 @@ bool RobotisController::setJointCtrlModuleService(robotis_controller_msgs::SetJo
return true;
}
bool RobotisController::setCtrlModuleService(robotis_controller_msgs::SetModule::Request &req, robotis_controller_msgs::SetModule::Response &res)
bool RobotisController::setCtrlModuleService(humanoid_robot_controller_msgs::SetModule::Request &req, humanoid_robot_controller_msgs::SetModule::Response &res)
{
if(set_module_thread_.joinable())
set_module_thread_.join();
@ -1861,14 +1861,14 @@ bool RobotisController::setCtrlModuleService(robotis_controller_msgs::SetModule:
return true;
}
bool RobotisController::loadOffsetService(robotis_controller_msgs::LoadOffset::Request &req, robotis_controller_msgs::LoadOffset::Response &res)
bool RobotisController::loadOffsetService(humanoid_robot_controller_msgs::LoadOffset::Request &req, humanoid_robot_controller_msgs::LoadOffset::Response &res)
{
loadOffset((std::string)req.file_path);
res.result = true;
return true;
}
void RobotisController::setJointCtrlModuleThread(const robotis_controller_msgs::JointCtrlModule::ConstPtr &msg)
void RobotisController::setJointCtrlModuleThread(const humanoid_robot_controller_msgs::JointCtrlModule::ConstPtr &msg)
{
// stop module list
std::list<MotionModule *> _stop_modules;
@ -2047,7 +2047,7 @@ void RobotisController::setJointCtrlModuleThread(const robotis_controller_msgs::
queue_mutex_.unlock();
// publish current module
robotis_controller_msgs::JointCtrlModule _current_module_msg;
humanoid_robot_controller_msgs::JointCtrlModule _current_module_msg;
for(std::map<std::string, Dynamixel *>::iterator _dxl_iter = robot_->dxls_.begin(); _dxl_iter != robot_->dxls_.end(); ++_dxl_iter)
{
_current_module_msg.joint_name.push_back(_dxl_iter->first);
@ -2263,7 +2263,7 @@ void RobotisController::setCtrlModuleThread(std::string ctrl_module)
queue_mutex_.unlock();
// publish current module
robotis_controller_msgs::JointCtrlModule current_module_msg;
humanoid_robot_controller_msgs::JointCtrlModule current_module_msg;
for (auto& dxl_iter : robot_->dxls_)
{
current_module_msg.joint_name.push_back(dxl_iter.first);

View File

@ -1,5 +1,5 @@
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Changelog for package robotis_device
Changelog for package humanoid_robot_device
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
0.3.1 (2023-09-27)
@ -73,7 +73,7 @@ Changelog for package robotis_device
* bug fixed (position pid gain & velocity pid gain sync write).
* added velocity_to_value_ratio to DXL Pro-H series.
* added velocity p/i/d gain and position i/d gain sync_write code.
* fixed robotis_device build_depend.
* fixed humanoid_robot_device build_depend.
* added XM-430-W210 / XM-430-W350 device file.
* rename (present_current\_ -> present_torque\_)
* modified torque control code

View File

@ -2,7 +2,7 @@
# Set minimum required version of cmake, project name and compile options
################################################################################
cmake_minimum_required(VERSION 3.0.2)
project(robotis_device)
project(humanoid_robot_device)
################################################################################
# Find catkin packages and libraries for catkin and system dependencies
@ -29,7 +29,7 @@ find_package(catkin REQUIRED COMPONENTS
################################################################################
catkin_package(
INCLUDE_DIRS include
LIBRARIES robotis_device
LIBRARIES humanoid_robot_device
CATKIN_DEPENDS
roscpp
dynamixel_sdk
@ -43,18 +43,18 @@ include_directories(
${catkin_INCLUDE_DIRS}
)
add_library(robotis_device
src/robotis_device/robot.cpp
src/robotis_device/sensor.cpp
src/robotis_device/dynamixel.cpp
add_library(humanoid_robot_device
src/humanoid_robot_device/robot.cpp
src/humanoid_robot_device/sensor.cpp
src/humanoid_robot_device/dynamixel.cpp
)
add_dependencies(robotis_device ${catkin_EXPORTED_TARGETS})
target_link_libraries(robotis_device ${catkin_LIBRARIES})
add_dependencies(humanoid_robot_device ${catkin_EXPORTED_TARGETS})
target_link_libraries(humanoid_robot_device ${catkin_LIBRARIES})
################################################################################
# Install
################################################################################
install(TARGETS robotis_device
install(TARGETS humanoid_robot_device
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}

View File

@ -26,7 +26,7 @@
#include <stdint.h>
namespace robotis_framework {
namespace humanoid_robot_framework {
enum AccessType { Read, ReadWrite };
@ -49,6 +49,6 @@ public:
is_signed_(false) {}
};
} // namespace robotis_framework
} // namespace humanoid_robot_framework
#endif /* ROBOTIS_DEVICE_CONTROL_TABLE_ITEM_H_ */

View File

@ -31,7 +31,7 @@
#include "control_table_item.h"
namespace robotis_framework
namespace humanoid_robot_framework
{
class Device

View File

@ -33,7 +33,7 @@
#include "device.h"
#include "dynamixel_state.h"
namespace robotis_framework
namespace humanoid_robot_framework
{
class Dynamixel : public Device

View File

@ -31,7 +31,7 @@
#define INDIRECT_DATA_1 "indirect_data_1"
#define INDIRECT_ADDRESS_1 "indirect_address_1"
namespace robotis_framework
namespace humanoid_robot_framework
{
class DynamixelState

View File

@ -43,7 +43,7 @@
#define DEFAULT_CONTROL_CYCLE 8 // milliseconds
namespace robotis_framework
namespace humanoid_robot_framework
{
class Robot

View File

@ -32,7 +32,7 @@
#include "sensor_state.h"
#include "control_table_item.h"
namespace robotis_framework
namespace humanoid_robot_framework
{
class Sensor : public Device

View File

@ -27,7 +27,7 @@
#include "time_stamp.h"
namespace robotis_framework
namespace humanoid_robot_framework
{
class SensorState

View File

@ -25,7 +25,7 @@
#define ROBOTIS_DEVICE_TIME_STAMP_H_
namespace robotis_framework
namespace humanoid_robot_framework
{
class TimeStamp {

View File

@ -1,11 +1,11 @@
<?xml version="1.0"?>
<package format="2">
<name>robotis_device</name>
<name>humanoid_robot_device</name>
<version>0.3.0</version>
<description>
The package that manages device information of ROBOTIS robots.
This package is used when reading device information with the robot information file
from the robotis_controller package.
from the humanoid_robot_controller package.
</description>
<license>Apache 2.0</license>
<maintainer email="ronaldsonbellande@gmail.com">Ronaldson Bellande</maintainer>

View File

@ -21,9 +21,9 @@
* Author: zerom
*/
#include "robotis_device/dynamixel.h"
#include "humanoid_robot_device/dynamixel.h"
using namespace robotis_framework;
using namespace humanoid_robot_framework;
Dynamixel::Dynamixel(int id, std::string model_name, float protocol_version)
: ctrl_module_name_("none"), torque_to_current_value_ratio_(1.0),

View File

@ -25,9 +25,9 @@
#include <fstream>
#include <iostream>
#include "robotis_device/robot.h"
#include "humanoid_robot_device/robot.h"
using namespace robotis_framework;
using namespace humanoid_robot_framework;
static inline std::string &ltrim(std::string &s) {
s.erase(s.begin(),

View File

@ -21,9 +21,9 @@
* Author: zerom
*/
#include "robotis_device/sensor.h"
#include "humanoid_robot_device/sensor.h"
using namespace robotis_framework;
using namespace humanoid_robot_framework;
Sensor::Sensor(int id, std::string model_name, float protocol_version) {

View File

@ -1,5 +1,5 @@
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Changelog for package robotis_framework
Changelog for package humanoid_robot_framework
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
0.3.1 (2023-09-27)
@ -45,7 +45,7 @@ Changelog for package robotis_framework
0.2.5 (2017-06-09)
------------------
* updated for yaml-cpp dependencies (robotis_controller)
* updated for yaml-cpp dependencies (humanoid_robot_controller)
* Contributors: SCH
0.2.4 (2017-06-07)
@ -61,7 +61,7 @@ Changelog for package robotis_framework
0.2.2 (2017-04-24)
------------------
* added a deivce: OpenCR
* updated robotis_controller.cpp
* updated humanoid_robot_controller.cpp
* changed to read control cycle from .robot file
* Contributors: Zerom, Kayman

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.0.2)
project(robotis_framework)
project(humanoid_robot_framework)
find_package(catkin REQUIRED)
catkin_metapackage()

View File

@ -0,0 +1,26 @@
<?xml version="1.0"?>
<package format="2">
<name>humanoid_robot_framework</name>
<version>0.3.0</version>
<description>ROS packages for the humanoid_robot_framework (meta package)</description>
<license>Apache 2.0</license>
<maintainer email="ronaldsonbellande@gmail.com">Ronaldson Bellande</maintainer>
<buildtool_depend>catkin</buildtool_depend>
<build_depend>humanoid_robot_controller</build_depend>
<build_depend>humanoid_robot_device</build_depend>
<build_depend>humanoid_robot_framework_common</build_depend>
<build_export_depend>humanoid_robot_controller</build_export_depend>
<build_export_depend>humanoid_robot_device</build_export_depend>
<build_export_depend>humanoid_robot_framework_common</build_export_depend>
<exec_depend>humanoid_robot_controller</exec_depend>
<exec_depend>humanoid_robot_device</exec_depend>
<exec_depend>humanoid_robot_framework_common</exec_depend>
<export>
<metapackage />
</export>
</package>

View File

@ -1,5 +1,5 @@
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Changelog for package robotis_framework_common
Changelog for package humanoid_robot_framework_common
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
0.3.1 (2023-09-27)

View File

@ -2,14 +2,14 @@
# Set minimum required version of cmake, project name and compile options
################################################################################
cmake_minimum_required(VERSION 2.8.3)
project(robotis_framework_common)
project(humanoid_robot_framework_common)
################################################################################
# Find catkin packages and libraries for catkin and system dependencies
################################################################################
find_package(catkin REQUIRED COMPONENTS
roscpp
robotis_device
humanoid_robot_device
)
################################################################################
@ -30,7 +30,7 @@ find_package(catkin REQUIRED COMPONENTS
catkin_package(
INCLUDE_DIRS include
LIBRARIES ${PROJECT_NAME}
CATKIN_DEPENDS roscpp robotis_device
CATKIN_DEPENDS roscpp humanoid_robot_device
)
################################################################################
@ -51,7 +51,7 @@ set_target_properties(${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE CXX)
################################################################################
# Install
################################################################################
install(TARGETS robotis_framework_common
install(TARGETS humanoid_robot_framework_common
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}

View File

@ -29,10 +29,10 @@
#include <string>
#include "singleton.h"
#include "robotis_device/robot.h"
#include "robotis_device/dynamixel.h"
#include "humanoid_robot_device/robot.h"
#include "humanoid_robot_device/dynamixel.h"
namespace robotis_framework
namespace humanoid_robot_framework
{
enum ControlMode

View File

@ -29,10 +29,10 @@
#include <string>
#include "singleton.h"
#include "robotis_device/robot.h"
#include "robotis_device/dynamixel.h"
#include "humanoid_robot_device/robot.h"
#include "humanoid_robot_device/dynamixel.h"
namespace robotis_framework
namespace humanoid_robot_framework
{
class SensorModule

View File

@ -25,7 +25,7 @@
#define ROBOTIS_FRAMEWORK_COMMON_SINGLETON_H_
namespace robotis_framework
namespace humanoid_robot_framework
{
template <class T>

View File

@ -1,6 +1,6 @@
<?xml version="1.0"?>
<package format="2">
<name>robotis_framework_common</name>
<name>humanoid_robot_framework_common</name>
<version>0.2.9</version>
<description>The package contains commonly used Headers for the ROBOTIS Framework.</description>
<license>Apache 2.0</license>
@ -9,12 +9,12 @@
<buildtool_depend>catkin</buildtool_depend>
<build_depend>roscpp</build_depend>
<build_depend>robotis_device</build_depend>
<build_depend>humanoid_robot_device</build_depend>
<build_export_depend>roscpp</build_export_depend>
<build_export_depend>robotis_device</build_export_depend>
<build_export_depend>humanoid_robot_device</build_export_depend>
<exec_depend>roscpp</exec_depend>
<exec_depend>robotis_device</exec_depend>
<exec_depend>humanoid_robot_device</exec_depend>
</package>

4
push.sh Executable file
View File

@ -0,0 +1,4 @@
#!/bin/bash
# Git push what is already in the repository
git pull --no-edit; git fetch; git add .; git commit -am "latest pushes"; git push

110
repository_recal.sh Executable file
View File

@ -0,0 +1,110 @@
#!/bin/bash
# Git push what is already in the repository
git pull --no-edit; git fetch; git add .; git commit -am "latest pushes"; git push
# Get the current directory
current_dir=$(pwd)
# Read the remote repository URL from .git/config
remote_repo_url=$(git -C "$current_dir" config --get remote.origin.url)
# Create a temporary directory for cloning the repository
temp_dir=$(mktemp -d)
# Clone the repository into the temporary directory without using local references
git clone --no-local "$current_dir" "$temp_dir"
# Switch to the temporary directory
cd "$temp_dir"
# Create a temporary file to store the file list
tmp_file=$(mktemp)
# Create a temporary file to store the processed commits
processed_commits_file=$(mktemp)
# Function to check if a commit has already been processed
is_commit_processed() {
local commit="$1"
# Check if the commit is already processed
grep -Fxq "$commit" "$processed_commits_file"
}
# Function to mark a commit as processed
mark_commit_processed() {
local commit="$1"
# Mark the commit as processed
echo "$commit" >> "$processed_commits_file"
}
# Function to check if a file or folder exists in the repository
file_exists_in_repo() {
local file_path="$1"
# Check if the file or folder exists in the repository
git ls-tree --name-only -r HEAD | grep -Fxq "$file_path"
}
# Function to process the files and folders in each commit
process_commit_files() {
local commit="$1"
# Check if the commit has already been processed
if is_commit_processed "$commit"; then
echo "Commit $commit already processed. Skipping..."
return
fi
# Get the list of files and folders in the commit (including subfolders)
git ls-tree --name-only -r "$commit" >> "$tmp_file"
# Process each file or folder in the commit
while IFS= read -r line
do
# Check if the file or folder exists in the current push
if file_exists_in_repo "$line"; then
echo "Keeping: $line"
else
echo "Deleting: $line"
git filter-repo --path "$line" --invert-paths
fi
done < "$tmp_file"
# Mark the commit as processed
mark_commit_processed "$commit"
# Clear the temporary file
> "$tmp_file"
}
# Iterate over each commit in the repository
git rev-list --all | while IFS= read -r commit
do
process_commit_files "$commit"
done
# Push the filtered changes to the original repository
git remote add origin "$remote_repo_url"
git push --force origin main
# Perform a history rewrite to remove the filtered files
git filter-repo --force
# Fetch the changes from the remote repository
git -C "$current_dir" fetch origin
# Merge the remote changes into the local repository
git -C "$current_dir" merge origin/main --no-edit
# Update the local repository and reduce the size of .git if needed
git -C "$current_dir" gc --prune=now
git -C "$current_dir" reflog expire --expire=now --all
git -C "$current_dir" repack -ad
# Clean up temporary files and directories
cd "$current_dir"
rm -rf "$temp_dir"
rm "$tmp_file"
rm "$processed_commits_file"

View File

@ -1,26 +0,0 @@
<?xml version="1.0"?>
<package format="2">
<name>robotis_framework</name>
<version>0.3.0</version>
<description>ROS packages for the robotis_framework (meta package)</description>
<license>Apache 2.0</license>
<maintainer email="ronaldsonbellande@gmail.com">Ronaldson Bellande</maintainer>
<buildtool_depend>catkin</buildtool_depend>
<build_depend>robotis_controller</build_depend>
<build_depend>robotis_device</build_depend>
<build_depend>robotis_framework_common</build_depend>
<build_export_depend>robotis_controller</build_export_depend>
<build_export_depend>robotis_device</build_export_depend>
<build_export_depend>robotis_framework_common</build_export_depend>
<exec_depend>robotis_controller</exec_depend>
<exec_depend>robotis_device</exec_depend>
<exec_depend>robotis_framework_common</exec_depend>
<export>
<metapackage />
</export>
</package>