diff --git a/README.md b/README.md index 5d79dd38..76f461ce 100644 --- a/README.md +++ b/README.md @@ -7,16 +7,11 @@ [![humble-devel Status](https://github.com/ROBOTIS-GIT/dynamixel-workbench/workflows/humble-devel/badge.svg)](https://github.com/ROBOTIS-GIT/dynamixel-workbench/tree/humble-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) @@ -26,7 +21,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) @@ -34,8 +29,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/) 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";