From a5568c26c89972128aa5570ea5f39d868859971f Mon Sep 17 00:00:00 2001 From: ROBOTIS-Will Date: Tue, 25 Jan 2022 18:02:39 +0900 Subject: [PATCH 1/2] update ReadMe Signed-off-by: ROBOTIS-Will --- README.md | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 17b2cc60..8438a4f5 100644 --- a/README.md +++ b/README.md @@ -5,16 +5,11 @@ [![galactic-devel Status](https://github.com/ROBOTIS-GIT/dynamixel-workbench/workflows/galactic-devel/badge.svg)](https://github.com/ROBOTIS-GIT/dynamixel-workbench/tree/galactic-devel) [![ROS2 Rolling Status](https://github.com/ROBOTIS-GIT/dynamixel-workbench/workflows/ros2-ci/badge.svg)](https://github.com/ROBOTIS-GIT/dynamixel-workbench/tree/ros2) -# Dynamixel Workbench +# DYNAMIXEL Workbench ![](https://github.com/ROBOTIS-GIT/emanual/blob/master/assets/images/sw/dynamixel/dynamixel_workbench/DYNAMIXEL_WORKBENCH_LOGO.png) -## ROS Packages for Dynamixel Workbench -|Version|Kinetic + Ubuntu Xenial|Melodic + Ubuntu Bionic| -|:---:|:---:|:---:| -|[![GitHub version](https://badge.fury.io/gh/ROBOTIS-GIT%2Fdynamixel-workbench.svg)](https://badge.fury.io/gh/ROBOTIS-GIT%2Fdynamixel-workbench)|[![Build Status](https://travis-ci.org/ROBOTIS-GIT/dynamixel-workbench.svg?branch=kinetic-devel)](https://travis-ci.org/ROBOTIS-GIT/dynamixel-workbench)|[![Build Status](https://travis-ci.org/ROBOTIS-GIT/dynamixel-workbench.svg?branch=melodic-devel)](https://travis-ci.org/ROBOTIS-GIT/dynamixel-workbench)| - -## ROBOTIS e-Manual for Dynamixel Workbench -- [ROBOTIS e-Manual for Dynamixel Workbench](http://emanual.robotis.com/docs/en/software/dynamixel/dynamixel_workbench/) +## ROBOTIS e-Manual for DYNAMIXEL Workbench +- [ROBOTIS e-Manual for DYNAMIXEL Workbench](http://emanual.robotis.com/docs/en/software/dynamixel/dynamixel_workbench/) ## Wiki for dynamixel_workbench Packages - http://wiki.ros.org/dynamixel_workbench (metapackage) @@ -24,7 +19,7 @@ - http://wiki.ros.org/dynamixel_workbench_single_manager_gui - http://wiki.ros.org/dynamixel_workbench_toolbox -## Open Source related to Dynamixel Workbench +## Open Source related to DYNAMIXEL Workbench - [dynamixel_workbench](https://github.com/ROBOTIS-GIT/dynamixel-workbench) - [dynamixel_workbench_msgs](https://github.com/ROBOTIS-GIT/dynamixel-workbench-msgs) - [dynamixel_sdk](https://github.com/ROBOTIS-GIT/DynamixelSDK) @@ -32,8 +27,8 @@ - [OpenCR-Hardware](https://github.com/ROBOTIS-GIT/OpenCR-Hardware) - [OpenCR](https://github.com/ROBOTIS-GIT/OpenCR) -## Documents and Videos related to Dynamixel Workbench -- [ROBOTIS e-Manual for Dynamixel Workbench](http://emanual.robotis.com/docs/en/software/dynamixel/dynamixel_workbench/) -- [ROBOTIS e-Manual for Dynamixel SDK](http://emanual.robotis.com/docs/en/software/dynamixel/dynamixel_sdk/overview/) +## Documents and Videos related to DYNAMIXEL Workbench +- [ROBOTIS e-Manual for DYNAMIXEL Workbench](http://emanual.robotis.com/docs/en/software/dynamixel/dynamixel_workbench/) +- [ROBOTIS e-Manual for DYNAMIXEL SDK](http://emanual.robotis.com/docs/en/software/dynamixel/dynamixel_sdk/overview/) - [ROBOTIS e-Manual for OpenManipulator](http://emanual.robotis.com/docs/en/platform/openmanipulator/) - [ROBOTIS e-Manual for OpenCR](http://emanual.robotis.com/docs/en/parts/controller/opencr10/) From b91008842870b3d7be178fe7e89ec024633e0f18 Mon Sep 17 00:00:00 2001 From: Kenji Brameld Date: Tue, 20 Sep 2022 17:53:28 +0900 Subject: [PATCH 2/2] fix variable length warning using std::vector Signed-off-by: Kenji Brameld --- .../src/dynamixel_workbench_toolbox/dynamixel_driver.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/dynamixel_workbench_toolbox/src/dynamixel_workbench_toolbox/dynamixel_driver.cpp b/dynamixel_workbench_toolbox/src/dynamixel_workbench_toolbox/dynamixel_driver.cpp index 3fdd1550..7a6fb324 100644 --- a/dynamixel_workbench_toolbox/src/dynamixel_workbench_toolbox/dynamixel_driver.cpp +++ b/dynamixel_workbench_toolbox/src/dynamixel_workbench_toolbox/dynamixel_driver.cpp @@ -16,6 +16,7 @@ /* Authors: Taehun Lim (Darby) */ +#include #include "../../include/dynamixel_workbench_toolbox/dynamixel_driver.h" DynamixelDriver::DynamixelDriver() : tools_cnt_(0), @@ -773,13 +774,13 @@ bool DynamixelDriver::readRegister(uint8_t id, uint16_t address, uint16_t length { ErrorFromSDK sdk_error = {0, false, false, 0}; - uint8_t data_read[length]; + std::vector data_read(length); sdk_error.dxl_comm_result = packetHandler_->readTxRx(portHandler_, id, address, length, - (uint8_t *)&data_read, + data_read.data(), &sdk_error.dxl_error); if (sdk_error.dxl_comm_result != COMM_SUCCESS) { @@ -1009,7 +1010,7 @@ bool DynamixelDriver::syncWrite(uint8_t index, uint8_t *id, uint8_t id_num, int3 ErrorFromSDK sdk_error = {0, false, false, 0}; uint8_t parameter[4] = {0, 0, 0, 0}; - uint8_t multi_parameter[4*data_num_for_each_id]; + std::vector multi_parameter(4*data_num_for_each_id); uint8_t cnt = 0; for (int i = 0; i < id_num; i++) @@ -1023,7 +1024,7 @@ bool DynamixelDriver::syncWrite(uint8_t index, uint8_t *id, uint8_t id_num, int3 } } - sdk_error.dxl_addparam_result = syncWriteHandler_[index].groupSyncWrite->addParam(id[i], (uint8_t *)&multi_parameter); + sdk_error.dxl_addparam_result = syncWriteHandler_[index].groupSyncWrite->addParam(id[i], multi_parameter.data()); if (sdk_error.dxl_addparam_result != true) { if (log != NULL) *log = "groupSyncWrite addparam failed";