forked from stooppas/niryo_one_ros2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
203 changed files
with
38,943 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
{ | ||
"files.associations": { | ||
"unordered_map": "cpp", | ||
"functional": "cpp", | ||
"cctype": "cpp", | ||
"clocale": "cpp", | ||
"cmath": "cpp", | ||
"cstdarg": "cpp", | ||
"cstddef": "cpp", | ||
"cstdio": "cpp", | ||
"cstdlib": "cpp", | ||
"cstring": "cpp", | ||
"ctime": "cpp", | ||
"cwchar": "cpp", | ||
"cwctype": "cpp", | ||
"array": "cpp", | ||
"atomic": "cpp", | ||
"*.tcc": "cpp", | ||
"bitset": "cpp", | ||
"chrono": "cpp", | ||
"complex": "cpp", | ||
"condition_variable": "cpp", | ||
"cstdint": "cpp", | ||
"deque": "cpp", | ||
"list": "cpp", | ||
"vector": "cpp", | ||
"exception": "cpp", | ||
"algorithm": "cpp", | ||
"iterator": "cpp", | ||
"map": "cpp", | ||
"memory": "cpp", | ||
"memory_resource": "cpp", | ||
"numeric": "cpp", | ||
"optional": "cpp", | ||
"random": "cpp", | ||
"ratio": "cpp", | ||
"set": "cpp", | ||
"string": "cpp", | ||
"string_view": "cpp", | ||
"system_error": "cpp", | ||
"tuple": "cpp", | ||
"type_traits": "cpp", | ||
"utility": "cpp", | ||
"fstream": "cpp", | ||
"initializer_list": "cpp", | ||
"iomanip": "cpp", | ||
"iosfwd": "cpp", | ||
"iostream": "cpp", | ||
"istream": "cpp", | ||
"limits": "cpp", | ||
"mutex": "cpp", | ||
"new": "cpp", | ||
"ostream": "cpp", | ||
"sstream": "cpp", | ||
"stdexcept": "cpp", | ||
"streambuf": "cpp", | ||
"thread": "cpp", | ||
"cinttypes": "cpp", | ||
"typeinfo": "cpp", | ||
"bit": "cpp", | ||
"strstream": "cpp", | ||
"unordered_set": "cpp", | ||
"cfenv": "cpp", | ||
"typeindex": "cpp", | ||
"variant": "cpp" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
Changelog for package dynamixel_sdk | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
3.4.7 (2017-07-18) | ||
----------- | ||
* hotfix - Bug in Dynamixel group control is solved temporarily | ||
* Contributors: Leon, Zerom | ||
|
||
3.4.6 (2017-07-07) | ||
----------- | ||
* hotfix - now DynamixelSDK for protocol1.0 supports read/write 4Byte (for XM series) | ||
* Contributors: Leon | ||
|
||
3.4.5 (2017-05-23) | ||
----------- | ||
* added option to check if the id of rxpacket is the same as the id of txpacket. | ||
* Contributors: Leon, Zerom | ||
|
||
3.4.4 (2017-04-26) | ||
----------- | ||
* hotfix - return delay time is changed from 4 into 8 due to the Ubuntu update 16.04.2 | ||
* Contributors: Leon | ||
|
||
3.4.3 (2017-02-17) | ||
----------- | ||
* DynamixelSDK C++ ver. and ROS ver. in Windows platform now can use the port number of over then 10 #45 | ||
* Contributors: Leon | ||
|
||
3.4.2 (2017-02-16) | ||
----------- | ||
* fprintf output in GrouBulkRead of C++ removed | ||
* MATLAB library compiler error solving | ||
* Makefile for build example sources in SBC added | ||
* build files of windows c and c++ SDK rebuilt by using renewed SDK libraries | ||
* example source of dxl_monitor - c and cpp ver modified #50 | ||
* Solved issue : #31, #34, #36, #50 | ||
* Contributors: Leon | ||
|
||
3.4.1 (2016-08-22) | ||
----------- | ||
* added ROS package folder for ROS users | ||
* modified original header files for ROS package | ||
* Contributors: Leon | ||
|
||
3.4.0 (2016-08-12) | ||
----------- | ||
* first public release for Kinetic | ||
* added package information for wrapping version for ROS | ||
* added ROS catkin package files. | ||
* linux build file for SBC | ||
* License marks for example codes | ||
* Resource Files comments Korean -> English | ||
* Update Makefile | ||
* Update Makefile | ||
* comments modified & aligned | ||
* Release folders in c++ example removed & dxl_monitor.cpp Capital function name modified as ROS c++ code style & included file paths of packet/port handler in dynamixel_sdk.h removed and added parent header file | ||
* Update dxl_monitor.cpp | ||
* file opened | ||
* folder name modification error solved | ||
* License specified | ||
* Code Style modified into ROS C++ coding style | ||
Function & File Names changed into underscored | ||
* Group Bulk/Sync class ClearParam() function changed. | ||
* dll file name changed | ||
* dll file name changed | ||
* Comment modified | ||
* [Protocol1PacketHandler] | ||
RxPacket packet length re-calculate bug fixed. | ||
* [Protocol2PacketHandler] | ||
RxPacket packet length re-calculate bug fixed. | ||
* Makefile updated | ||
Source reorganization | ||
* Windows version updated | ||
Makefile modified | ||
Source reorganization | ||
* GroupBulkRead : GetData function bug fixed. | ||
* [GroupBulkRead / GroupSyncRead] | ||
added IsAvailable() function | ||
modified GetData() function | ||
* GetData() function changed. | ||
* reducing the count of calling MakeParam function | ||
* added rxpacket error check | ||
* ReadTxRx function modified. (to use TxRxPacket function) | ||
* DXL Monitor program arguments added. | ||
* if the last bulk_read / sync_read result is failure -> GetData return false | ||
* communication result & rx packet error print function modified. | ||
* first release | ||
* Contributors: Leon, Zerom, Pyo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
################################################################################ | ||
# Set minimum required version of cmake, project name and compile options | ||
################################################################################ | ||
cmake_minimum_required(VERSION 3.5) | ||
project(dynamixel_sdk) | ||
|
||
if(NOT CMAKE_CXX_STANDARD) | ||
set(CMAKE_CXX_STANDARD 14) | ||
endif() | ||
|
||
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") | ||
add_compile_options(-Wall -Wextra -Wpedantic -Wno-unused-but-set-variable -Wno-unused-parameter -Wno-unused-variable) | ||
endif() | ||
|
||
################################################################################ | ||
# Find ament packages and libraries for ament and system dependencies | ||
################################################################################ | ||
find_package(ament_cmake REQUIRED) | ||
find_package(rclcpp REQUIRED) | ||
|
||
################################################################################ | ||
# Build | ||
################################################################################ | ||
include_directories( | ||
include | ||
) | ||
|
||
set(DYNAMIXEL_SDK_SOURCES | ||
src/packet_handler.cpp | ||
src/protocol1_packet_handler.cpp | ||
src/protocol2_packet_handler.cpp | ||
src/group_sync_read.cpp | ||
src/group_sync_write.cpp | ||
src/group_bulk_read.cpp | ||
src/group_bulk_write.cpp | ||
src/port_handler.cpp | ||
) | ||
|
||
if(APPLE) | ||
add_library(dynamixel_sdk SHARED | ||
${DYNAMIXEL_SDK_SOURCES} | ||
src/port_handler_mac.cpp | ||
) | ||
elseif(WIN32) | ||
add_library(dynamixel_sdk SHARED | ||
${DYNAMIXEL_SDK_SOURCES} | ||
src/port_handler_windows.cpp | ||
) | ||
else() | ||
add_library(dynamixel_sdk SHARED | ||
${DYNAMIXEL_SDK_SOURCES} | ||
src/port_handler_linux.cpp | ||
) | ||
endif() | ||
|
||
EXECUTE_PROCESS( COMMAND uname -m COMMAND tr -d '\n' OUTPUT_VARIABLE ARCHITECTURE ) | ||
message( STATUS "Architecture: ${ARCHITECTURE}" ) | ||
|
||
if (${ARCHITECTURE} MATCHES "aarch64") | ||
message(STATUS "wiringPi library is required for dynamixel_sdk (aarch64 processor)") | ||
target_link_libraries(dynamixel_sdk | ||
${catkin_LIBRARIES} | ||
-lwiringPi | ||
) | ||
else() | ||
message(STATUS "wiringPi library not required") | ||
target_link_libraries(dynamixel_sdk | ||
${catkin_LIBRARIES} | ||
) | ||
endif() | ||
|
||
################################################################################ | ||
# Install | ||
################################################################################ | ||
install( | ||
DIRECTORY include/ | ||
DESTINATION include/ | ||
) | ||
|
||
install( | ||
TARGETS ${PROJECT_NAME} | ||
ARCHIVE DESTINATION lib | ||
LIBRARY DESTINATION lib | ||
RUNTIME DESTINATION bin | ||
) | ||
|
||
################################################################################ | ||
# Macro for ament package | ||
################################################################################ | ||
ament_export_include_directories(include) | ||
ament_export_libraries(${PROJECT_NAME}) | ||
ament_package() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Dynamixel SDK | ||
|
||
This package has been forked from the official [dynamixel_sdk](https://github.com/ROBOTIS-GIT/DynamixelSDK) package. | ||
|
||
It has been adapted to work on the Niryo custom Raspberry Pi 3 shield, using the [wiringPi](http://wiringpi.com/) library. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2016, ROBOTIS CO., LTD. | ||
* All rights reserved. | ||
* | ||
* Redistribution and use in source and binary forms, with or without | ||
* modification, are permitted provided that the following conditions are met: | ||
* | ||
* * Redistributions of source code must retain the above copyright notice, this | ||
* list of conditions and the following disclaimer. | ||
* | ||
* * Redistributions in binary form must reproduce the above copyright notice, | ||
* this list of conditions and the following disclaimer in the documentation | ||
* and/or other materials provided with the distribution. | ||
* | ||
* * Neither the name of ROBOTIS nor the names of its | ||
* contributors may be used to endorse or promote products derived from | ||
* this software without specific prior written permission. | ||
* | ||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | ||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
*******************************************************************************/ | ||
|
||
/* Author: zerom, Ryu Woon Jung (Leon) */ | ||
|
||
#ifndef DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_DYNAMIXELSDK_H_ | ||
#define DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_DYNAMIXELSDK_H_ | ||
|
||
|
||
#include "dynamixel_sdk/group_bulk_read.h" | ||
#include "dynamixel_sdk/group_bulk_write.h" | ||
#include "dynamixel_sdk/group_sync_read.h" | ||
#include "dynamixel_sdk/group_sync_write.h" | ||
#include "dynamixel_sdk/protocol1_packet_handler.h" | ||
#include "dynamixel_sdk/protocol2_packet_handler.h" | ||
|
||
#ifdef __linux__ | ||
#include "dynamixel_sdk/port_handler_linux.h" | ||
#endif | ||
|
||
#if defined(_WIN32) || defined(_WIN64) | ||
#include "dynamixel_sdk/port_handler_windows.h" | ||
#endif | ||
|
||
|
||
#endif /* DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_DYNAMIXELSDK_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2016, ROBOTIS CO., LTD. | ||
* All rights reserved. | ||
* | ||
* Redistribution and use in source and binary forms, with or without | ||
* modification, are permitted provided that the following conditions are met: | ||
* | ||
* * Redistributions of source code must retain the above copyright notice, this | ||
* list of conditions and the following disclaimer. | ||
* | ||
* * Redistributions in binary form must reproduce the above copyright notice, | ||
* this list of conditions and the following disclaimer in the documentation | ||
* and/or other materials provided with the distribution. | ||
* | ||
* * Neither the name of ROBOTIS nor the names of its | ||
* contributors may be used to endorse or promote products derived from | ||
* this software without specific prior written permission. | ||
* | ||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | ||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
*******************************************************************************/ | ||
|
||
/* Author: zerom, Ryu Woon Jung (Leon) */ | ||
|
||
#ifndef DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_GROUPBULKREAD_H_ | ||
#define DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_GROUPBULKREAD_H_ | ||
|
||
|
||
#include <map> | ||
#include <vector> | ||
#include "dynamixel_sdk/port_handler.h" | ||
#include "dynamixel_sdk/packet_handler.h" | ||
|
||
namespace dynamixel | ||
{ | ||
|
||
class WINDECLSPEC GroupBulkRead | ||
{ | ||
private: | ||
PortHandler *port_; | ||
PacketHandler *ph_; | ||
|
||
std::vector<uint8_t> id_list_; | ||
std::map<uint8_t, uint16_t> address_list_; // <id, start_address> | ||
std::map<uint8_t, uint16_t> length_list_; // <id, data_length> | ||
std::map<uint8_t, uint8_t *> data_list_; // <id, data> | ||
|
||
bool last_result_; | ||
bool is_param_changed_; | ||
|
||
uint8_t *param_; | ||
|
||
void makeParam(); | ||
|
||
public: | ||
GroupBulkRead(PortHandler *port, PacketHandler *ph); | ||
~GroupBulkRead() { clearParam(); } | ||
|
||
PortHandler *getPortHandler() { return port_; } | ||
PacketHandler *getPacketHandler() { return ph_; } | ||
|
||
bool addParam (uint8_t id, uint16_t start_address, uint16_t data_length); | ||
void removeParam (uint8_t id); | ||
void clearParam (); | ||
|
||
int txPacket(); | ||
int rxPacket(); | ||
int txRxPacket(); | ||
|
||
bool isAvailable (uint8_t id, uint16_t address, uint16_t data_length); | ||
uint32_t getData (uint8_t id, uint16_t address, uint16_t data_length); | ||
}; | ||
|
||
} | ||
|
||
|
||
#endif /* DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_GROUPBULKREAD_H_ */ |
Oops, something went wrong.