- sync with Dynamixel SDK

This commit is contained in:
ROBOTIS 2016-03-08 10:54:47 +09:00
parent 825616ad5d
commit 8bb48fc806
15 changed files with 68 additions and 39 deletions

View File

@ -0,0 +1,29 @@
/*
* DynamixelSDK.h
*
* Created on: 2016. 3. 8.
* Author: zerom
*/
#ifndef DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_DYNAMIXELSDK_H_
#define DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_DYNAMIXELSDK_H_
#include "dynamixel_sdk/RobotisDef.h"
#include "dynamixel_sdk/GroupBulkRead.h"
#include "dynamixel_sdk/GroupBulkWrite.h"
#include "dynamixel_sdk/GroupSyncRead.h"
#include "dynamixel_sdk/GroupSyncWrite.h"
#include "dynamixel_sdk/Protocol1PacketHandler.h"
#include "dynamixel_sdk/Protocol2PacketHandler.h"
#ifdef __linux__
#include "dynamixel_sdk_linux/PortHandlerLinux.h"
#endif
#if defined(_WIN32) || defined(_WIN64)
#include "dynamixel_sdk_windows/PortHandlerWindows.h"
#endif
#endif /* DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_DYNAMIXELSDK_H_ */

View File

@ -5,8 +5,8 @@
* Author: zerom
*/
#ifndef ROBOTIS_FRAMEWORK_DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_GROUPBULKREAD_H_
#define ROBOTIS_FRAMEWORK_DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_GROUPBULKREAD_H_
#ifndef DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_GROUPBULKREAD_H_
#define DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_GROUPBULKREAD_H_
#include <map>
@ -56,4 +56,4 @@ public:
}
#endif /* ROBOTIS_FRAMEWORK_DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_GROUPBULKREAD_H_ */
#endif /* DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_GROUPBULKREAD_H_ */

View File

@ -5,8 +5,8 @@
* Author: zerom
*/
#ifndef ROBOTIS_FRAMEWORK_DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_GROUPBULKWRITE_H_
#define ROBOTIS_FRAMEWORK_DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_GROUPBULKWRITE_H_
#ifndef DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_GROUPBULKWRITE_H_
#define DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_GROUPBULKWRITE_H_
#include <map>
@ -52,4 +52,4 @@ public:
}
#endif /* ROBOTIS_FRAMEWORK_DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_GROUPBULKWRITE_H_ */
#endif /* DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_GROUPBULKWRITE_H_ */

View File

@ -5,8 +5,8 @@
* Author: zerom
*/
#ifndef ROBOTIS_FRAMEWORK_DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_GROUPSYNCREAD_H_
#define ROBOTIS_FRAMEWORK_DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_GROUPSYNCREAD_H_
#ifndef DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_GROUPSYNCREAD_H_
#define DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_GROUPSYNCREAD_H_
#include <map>
@ -56,4 +56,4 @@ public:
}
#endif /* ROBOTIS_FRAMEWORK_DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_GROUPSYNCREAD_H_ */
#endif /* DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_GROUPSYNCREAD_H_ */

View File

@ -5,8 +5,8 @@
* Author: zerom
*/
#ifndef ROBOTIS_FRAMEWORK_DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_GROUPSYNCWRITE_H_
#define ROBOTIS_FRAMEWORK_DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_GROUPSYNCWRITE_H_
#ifndef DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_GROUPSYNCWRITE_H_
#define DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_GROUPSYNCWRITE_H_
#include <map>
@ -51,4 +51,4 @@ public:
}
#endif /* ROBOTIS_FRAMEWORK_DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_GROUPSYNCWRITE_H_ */
#endif /* DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_GROUPSYNCWRITE_H_ */

View File

@ -5,8 +5,8 @@
* Author: zerom
*/
#ifndef ROBOTIS_FRAMEWORK_DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_PACKETHANDLER_H_
#define ROBOTIS_FRAMEWORK_DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_PACKETHANDLER_H_
#ifndef DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_PACKETHANDLER_H_
#define DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_PACKETHANDLER_H_
#include <vector>
@ -127,4 +127,4 @@ public:
}
#endif /* ROBOTIS_FRAMEWORK_DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_PACKETHANDLER_H_ */
#endif /* DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_PACKETHANDLER_H_ */

View File

@ -5,8 +5,8 @@
* Author: zerom
*/
#ifndef ROBOTIS_FRAMEWORK_DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_PORTHANDLER_H_
#define ROBOTIS_FRAMEWORK_DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_PORTHANDLER_H_
#ifndef DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_PORTHANDLER_H_
#define DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_PORTHANDLER_H_
#include "RobotisDef.h"
@ -48,4 +48,4 @@ public:
}
#endif /* ROBOTIS_FRAMEWORK_DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_PORTHANDLER_H_ */
#endif /* DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_PORTHANDLER_H_ */

View File

@ -5,8 +5,8 @@
* Author: zerom
*/
#ifndef ROBOTIS_FRAMEWORK_DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_PROTOCOL1PACKETHANDLER_H_
#define ROBOTIS_FRAMEWORK_DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_PROTOCOL1PACKETHANDLER_H_
#ifndef DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_PROTOCOL1PACKETHANDLER_H_
#define DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_PROTOCOL1PACKETHANDLER_H_
#include "PacketHandler.h"
@ -92,4 +92,4 @@ public:
}
#endif /* ROBOTIS_FRAMEWORK_DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_PROTOCOL1PACKETHANDLER_H_ */
#endif /* DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_PROTOCOL1PACKETHANDLER_H_ */

View File

@ -5,8 +5,8 @@
* Author: zerom
*/
#ifndef ROBOTIS_FRAMEWORK_DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_PROTOCOL2PACKETHANDLER_H_
#define ROBOTIS_FRAMEWORK_DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_PROTOCOL2PACKETHANDLER_H_
#ifndef DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_PROTOCOL2PACKETHANDLER_H_
#define DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_PROTOCOL2PACKETHANDLER_H_
#include "PacketHandler.h"
@ -97,4 +97,4 @@ public:
}
#endif /* ROBOTIS_FRAMEWORK_DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_PROTOCOL2PACKETHANDLER_H_ */
#endif /* DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_PROTOCOL2PACKETHANDLER_H_ */

View File

@ -5,8 +5,8 @@
* Author: zerom
*/
#ifndef ROBOTIS_FRAMEWORK_DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_ROBOTISDEF_H_
#define ROBOTIS_FRAMEWORK_DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_ROBOTISDEF_H_
#ifndef DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_ROBOTISDEF_H_
#define DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_ROBOTISDEF_H_
typedef char INT8_T;
@ -18,4 +18,4 @@ typedef unsigned short int UINT16_T;
typedef unsigned int UINT32_T;
#endif /* ROBOTIS_FRAMEWORK_DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_ROBOTISDEF_H_ */
#endif /* DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_ROBOTISDEF_H_ */

View File

@ -5,8 +5,8 @@
* Author: zerom
*/
#ifndef ROBOTIS_FRAMEWORK_DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_LINUX_PORTHANDLERLINUX_H_
#define ROBOTIS_FRAMEWORK_DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_LINUX_PORTHANDLERLINUX_H_
#ifndef DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_LINUX_PORTHANDLERLINUX_H_
#define DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_LINUX_PORTHANDLERLINUX_H_
#include "dynamixel_sdk/PortHandler.h"
@ -59,4 +59,4 @@ public:
}
#endif /* ROBOTIS_FRAMEWORK_DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_LINUX_PORTHANDLERLINUX_H_ */
#endif /* DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_SDK_LINUX_PORTHANDLERLINUX_H_ */

View File

@ -34,7 +34,7 @@ void GroupBulkRead::MakeParam()
param_ = new UINT8_T[id_list_.size() * 5]; // ID(1) + ADDR(2) + LENGTH(2)
int _idx = 0;
for(int _i = 0; _i < id_list_.size(); _i++)
for(unsigned int _i = 0; _i < id_list_.size(); _i++)
{
UINT8_T _id = id_list_[_i];
if(ph_->GetProtocolVersion() == 1.0)
@ -87,7 +87,7 @@ void GroupBulkRead::ClearParam()
{
if(id_list_.size() != 0)
{
for(int _i = 0; _i < id_list_.size(); _i++)
for(unsigned int _i = 0; _i < id_list_.size(); _i++)
delete[] data_list_[id_list_[_i]];
}

View File

@ -29,13 +29,13 @@ void GroupBulkWrite::MakeParam()
param_ = 0;
param_length_ = 0;
for(int _i = 0; _i < id_list_.size(); _i++)
for(unsigned int _i = 0; _i < id_list_.size(); _i++)
param_length_ += 1 + 2 + 2 + length_list_[id_list_[_i]];
param_ = new UINT8_T[param_length_];
int _idx = 0;
for(int _i = 0; _i < id_list_.size(); _i++)
for(unsigned int _i = 0; _i < id_list_.size(); _i++)
{
UINT8_T _id = id_list_[_i];
if(data_list_[_id] == 0)
@ -112,7 +112,7 @@ void GroupBulkWrite::ClearParam()
if(id_list_.size() != 0)
{
for(int _i = 0; _i < id_list_.size(); _i++)
for(unsigned int _i = 0; _i < id_list_.size(); _i++)
delete[] data_list_[id_list_[_i]];
}

View File

@ -32,7 +32,7 @@ void GroupSyncRead::MakeParam()
param_ = new UINT8_T[id_list_.size() * 1]; // ID(1)
int _idx = 0;
for(int _i = 0; _i < id_list_.size(); _i++)
for(unsigned int _i = 0; _i < id_list_.size(); _i++)
param_[_idx++] = id_list_[_i];
}
@ -72,7 +72,7 @@ void GroupSyncRead::ClearParam()
if(id_list_.size() != 0)
{
for(int _i = 0; _i < id_list_.size(); _i++)
for(unsigned int _i = 0; _i < id_list_.size(); _i++)
delete[] data_list_[id_list_[_i]];
}

View File

@ -32,7 +32,7 @@ void GroupSyncWrite::MakeParam()
param_ = new UINT8_T[id_list_.size() * (1 + data_length_)]; // ID(1) + DATA(data_length)
int _idx = 0;
for(int _i = 0; _i < id_list_.size(); _i++)
for(unsigned int _i = 0; _i < id_list_.size(); _i++)
{
UINT8_T _id = id_list_[_i];
if(data_list_[_id] == 0)
@ -90,7 +90,7 @@ void GroupSyncWrite::ClearParam()
{
if(id_list_.size() != 0)
{
for(int _i = 0; _i < id_list_.size(); _i++)
for(unsigned int _i = 0; _i < id_list_.size(); _i++)
delete[] data_list_[id_list_[_i]];
}