Skip to content

Commit

Permalink
Merge pull request #119 from ROBOTIS-GIT/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
LeonJung authored Sep 18, 2017
2 parents 918f37c + 6ee5df4 commit 0eb1e20
Show file tree
Hide file tree
Showing 28 changed files with 175 additions and 126 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,6 @@

# HTML
*.html

# Mac
.DS_Store
2 changes: 1 addition & 1 deletion Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = "DynamixelSDK c++"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 3.5.1
PROJECT_NUMBER = 3.5.2

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
| Dynamixel SDK Version | 1.X | 2.X | 3.X ([Download](https://github.com/ROBOTIS-GIT/DynamixelSDK/releases)) |
| ------------- | ------------- | ------------- | ------------- |
| Release date | 2010.05.16 | 2015.02.10 | 2016.03.08 |
| Latest version released |||3.5.1|
| |||(2017.08.18)|
| Latest version released |||3.5.2|
| |||(..)|
| OS | Linux | Windows | Linux + Windows + Mac |
| Available Dynamixel models | All models | All models | All models |
|||||
Expand All @@ -16,8 +16,8 @@
| Modularized Structure | X | X | O |
|||||
| SDK Languages : ||||
| (Protocol 1.0) | C (builds .a) | C (builds .dll)| C / C++ (builds .so & .dll) |
| (Protocol 2.0) | C++ (builds .so)| C (builds .dll)| C / C++ (builds .so & .dll) |
| (Protocol 1.0) | C (builds .a) | C (builds .dll)| C / C++ (builds .so & .dll & .dylib) |
| (Protocol 2.0) | C++ (builds .so)| C (builds .dll)| C / C++ (builds .so & .dll & .dylib) |
| SDK Examples : | | | |
| (C ver. Library binded)| C | | C|
| | | C++| |
Expand Down
9 changes: 9 additions & 0 deletions ReleaseNote.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
==============================================
Dynamixel SDK 3.5.2 (Protocol 1.0/2.0)
==============================================

- 09.18.2017

* Recover : Check if the id of rxpacket is the same as the id of txpacket (c++) #82
* Changes : Ping examples now will not show Dynamixel model number when communication is failed

==============================================
Dynamixel SDK 3.5.1 (Protocol 1.0/2.0)
==============================================
Expand Down
8 changes: 5 additions & 3 deletions c#/protocol1.0/ping/win32/ping/Ping.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,11 @@ static void Main(string[] args)
{
Console.WriteLine(Marshal.PtrToStringAnsi(dynamixel.getRxPacketError(PROTOCOL_VERSION, dxl_error)));
}

Console.WriteLine("[ID: {0}] ping Succeeded. Dynamixel model number : {1}", DXL_ID, dxl_model_number);

else
{
Console.WriteLine("[ID: {0}] ping Succeeded. Dynamixel model number : {1}", DXL_ID, dxl_model_number);
}

// Close port
dynamixel.closePort(port_num);

Expand Down
7 changes: 4 additions & 3 deletions c#/protocol1.0/ping/win64/ping/Ping.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,10 @@ static void Main(string[] args)
{
Console.WriteLine(Marshal.PtrToStringAnsi(dynamixel.getRxPacketError(PROTOCOL_VERSION, dxl_error)));
}

Console.WriteLine("[ID: {0}] ping Succeeded. Dynamixel model number : {1}", DXL_ID, dxl_model_number);

else
{
Console.WriteLine("[ID: {0}] ping Succeeded. Dynamixel model number : {1}", DXL_ID, dxl_model_number);
}
// Close port
dynamixel.closePort(port_num);

Expand Down
6 changes: 4 additions & 2 deletions c#/protocol2.0/ping/win32/ping/Ping.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,10 @@ static void Main(string[] args)
{
Console.WriteLine(Marshal.PtrToStringAnsi(dynamixel.getRxPacketError(PROTOCOL_VERSION, dxl_error)));
}

Console.WriteLine("[ID: {0}] ping Succeeded. Dynamixel model number : {1}", DXL_ID, dxl_model_number);
else
{
Console.WriteLine("[ID: {0}] ping Succeeded. Dynamixel model number : {1}", DXL_ID, dxl_model_number);
}

// Close port
dynamixel.closePort(port_num);
Expand Down
6 changes: 4 additions & 2 deletions c#/protocol2.0/ping/win64/ping/Ping.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,10 @@ static void Main(string[] args)
{
Console.WriteLine(Marshal.PtrToStringAnsi(dynamixel.getRxPacketError(PROTOCOL_VERSION, dxl_error)));
}

Console.WriteLine("[ID: {0}] ping Succeeded. Dynamixel model number : {1}", DXL_ID, dxl_model_number);
else
{
Console.WriteLine("[ID: {0}] ping Succeeded. Dynamixel model number : {1}", DXL_ID, dxl_model_number);
}

// Close port
dynamixel.closePort(port_num);
Expand Down
6 changes: 6 additions & 0 deletions c++/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
Changelog for package dynamixel_sdk
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

3.5.2 (2017-09-18)
-----------
* Recover : Check if the id of rxpacket is the same as the id of txpacket #82
* Changes : Ping examples now will not show Dynamixel model number when communication is failed
* Contributors: Leon

3.5.1 (2017-08-18)
-----------
* Standardizes folder structure of ROS c++
Expand Down
27 changes: 16 additions & 11 deletions c++/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,22 @@ include_directories(
${catkin_INCLUDE_DIRS}
)

add_library(dynamixel_sdk
src/dynamixel_sdk/packet_handler.cpp
src/dynamixel_sdk/protocol1_packet_handler.cpp
src/dynamixel_sdk/protocol2_packet_handler.cpp
src/dynamixel_sdk/group_sync_read.cpp
src/dynamixel_sdk/group_sync_write.cpp
src/dynamixel_sdk/group_bulk_read.cpp
src/dynamixel_sdk/group_bulk_write.cpp
src/dynamixel_sdk/port_handler.cpp
src/dynamixel_sdk/port_handler_linux.cpp
)
add_library(dynamixel_sdk
src/dynamixel_sdk/packet_handler.cpp
src/dynamixel_sdk/protocol1_packet_handler.cpp
src/dynamixel_sdk/protocol2_packet_handler.cpp
src/dynamixel_sdk/group_sync_read.cpp
src/dynamixel_sdk/group_sync_write.cpp
src/dynamixel_sdk/group_bulk_read.cpp
src/dynamixel_sdk/group_bulk_write.cpp
src/dynamixel_sdk/port_handler.cpp
)
if(APPLE)
target_sources(dynamixel_sdk PRIVATE src/dynamixel_sdk/port_handler_mac.cpp)
else()
target_sources(dynamixel_sdk PRIVATE src/dynamixel_sdk/port_handler_linux.cpp)
endif()

add_dependencies(dynamixel_sdk ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
target_link_libraries(dynamixel_sdk ${catkin_LIBRARIES})

Expand Down
6 changes: 4 additions & 2 deletions c++/example/protocol1.0/ping/ping.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,10 @@ int main()
{
printf("%s\n", packetHandler->getRxPacketError(dxl_error));
}

printf("[ID:%03d] ping Succeeded. Dynamixel model number : %d\n", DXL_ID, dxl_model_number);
else
{
printf("[ID:%03d] ping Succeeded. Dynamixel model number : %d\n", DXL_ID, dxl_model_number);
}

// Close port
portHandler->closePort();
Expand Down
6 changes: 4 additions & 2 deletions c++/example/protocol2.0/ping/ping.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,10 @@ int main()
{
printf("%s\n", packetHandler->getRxPacketError(dxl_error));
}

printf("[ID:%03d] ping Succeeded. Dynamixel model number : %d\n", DXL_ID, dxl_model_number);
else
{
printf("[ID:%03d] ping Succeeded. Dynamixel model number : %d\n", DXL_ID, dxl_model_number);
}

// Close port
portHandler->closePort();
Expand Down
8 changes: 4 additions & 4 deletions c++/include/dynamixel_sdk/packet_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ class WINDECLSPEC PacketHandler
/// @param error Dynamixel hardware error
/// @return communication results which come from PacketHandler::rxPacket()
////////////////////////////////////////////////////////////////////////////////
virtual int readRx (PortHandler *port, uint16_t length, uint8_t *data, uint8_t *error = 0) = 0;
virtual int readRx (PortHandler *port, uint8_t id, uint16_t length, uint8_t *data, uint8_t *error = 0) = 0;

////////////////////////////////////////////////////////////////////////////////
/// @brief The function that transmits INST_READ instruction packet, and read data from received packet
Expand Down Expand Up @@ -329,7 +329,7 @@ class WINDECLSPEC PacketHandler
/// @param error Dynamixel hardware error
/// @return communication results which come from PacketHandler::readRx()
////////////////////////////////////////////////////////////////////////////////
virtual int read1ByteRx (PortHandler *port, uint8_t *data, uint8_t *error = 0) = 0;
virtual int read1ByteRx (PortHandler *port, uint8_t id, uint8_t *data, uint8_t *error = 0) = 0;

////////////////////////////////////////////////////////////////////////////////
/// @brief The function that calls PacketHandler::readTxRx() function for reading 1 byte data
Expand Down Expand Up @@ -364,7 +364,7 @@ class WINDECLSPEC PacketHandler
/// @param error Dynamixel hardware error
/// @return communication results which come from PacketHandler::readRx()
////////////////////////////////////////////////////////////////////////////////
virtual int read2ByteRx (PortHandler *port, uint16_t *data, uint8_t *error = 0) = 0;
virtual int read2ByteRx (PortHandler *port, uint8_t id, uint16_t *data, uint8_t *error = 0) = 0;

////////////////////////////////////////////////////////////////////////////////
/// @brief The function that calls PacketHandler::readTxRx() function for reading 2 byte data
Expand Down Expand Up @@ -399,7 +399,7 @@ class WINDECLSPEC PacketHandler
/// @param error Dynamixel hardware error
/// @return communication results which come from PacketHandler::readRx()
////////////////////////////////////////////////////////////////////////////////
virtual int read4ByteRx (PortHandler *port, uint32_t *data, uint8_t *error = 0) = 0;
virtual int read4ByteRx (PortHandler *port, uint8_t id, uint32_t *data, uint8_t *error = 0) = 0;

////////////////////////////////////////////////////////////////////////////////
/// @brief The function that calls PacketHandler::readTxRx() function for reading 4 byte data
Expand Down
8 changes: 4 additions & 4 deletions c++/include/dynamixel_sdk/protocol1_packet_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ class WINDECLSPEC Protocol1PacketHandler : public PacketHandler
/// @param error Dynamixel hardware error
/// @return communication results which come from Protocol1PacketHandler::rxPacket()
////////////////////////////////////////////////////////////////////////////////
int readRx (PortHandler *port, uint16_t length, uint8_t *data, uint8_t *error = 0);
int readRx (PortHandler *port, uint8_t id, uint16_t length, uint8_t *data, uint8_t *error = 0);

////////////////////////////////////////////////////////////////////////////////
/// @brief The function that transmits INST_READ instruction packet, and read data from received packet
Expand Down Expand Up @@ -285,7 +285,7 @@ class WINDECLSPEC Protocol1PacketHandler : public PacketHandler
/// @param error Dynamixel hardware error
/// @return communication results which come from Protocol1PacketHandler::readRx()
////////////////////////////////////////////////////////////////////////////////
int read1ByteRx (PortHandler *port, uint8_t *data, uint8_t *error = 0);
int read1ByteRx (PortHandler *port, uint8_t id, uint8_t *data, uint8_t *error = 0);

////////////////////////////////////////////////////////////////////////////////
/// @brief The function that calls Protocol1PacketHandler::readTxRx() function for reading 1 byte data
Expand Down Expand Up @@ -320,7 +320,7 @@ class WINDECLSPEC Protocol1PacketHandler : public PacketHandler
/// @param error Dynamixel hardware error
/// @return communication results which come from Protocol1PacketHandler::readRx()
////////////////////////////////////////////////////////////////////////////////
int read2ByteRx (PortHandler *port, uint16_t *data, uint8_t *error = 0);
int read2ByteRx (PortHandler *port, uint8_t id, uint16_t *data, uint8_t *error = 0);

////////////////////////////////////////////////////////////////////////////////
/// @brief The function that calls Protocol1PacketHandler::readTxRx() function for reading 2 byte data
Expand Down Expand Up @@ -355,7 +355,7 @@ class WINDECLSPEC Protocol1PacketHandler : public PacketHandler
/// @param error Dynamixel hardware error
/// @return communication results which come from Protocol1PacketHandler::readRx()
////////////////////////////////////////////////////////////////////////////////
int read4ByteRx (PortHandler *port, uint32_t *data, uint8_t *error = 0);
int read4ByteRx (PortHandler *port, uint8_t id, uint32_t *data, uint8_t *error = 0);

////////////////////////////////////////////////////////////////////////////////
/// @brief The function that calls Protocol1PacketHandler::readTxRx() function for reading 4 byte data
Expand Down
8 changes: 4 additions & 4 deletions c++/include/dynamixel_sdk/protocol2_packet_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ class WINDECLSPEC Protocol2PacketHandler : public PacketHandler
/// @param error Dynamixel hardware error
/// @return communication results which come from Protocol2PacketHandler::rxPacket()
////////////////////////////////////////////////////////////////////////////////
int readRx (PortHandler *port, uint16_t length, uint8_t *data, uint8_t *error = 0);
int readRx (PortHandler *port, uint8_t id, uint16_t length, uint8_t *data, uint8_t *error = 0);

////////////////////////////////////////////////////////////////////////////////
/// @brief The function that transmits INST_READ instruction packet, and read data from received packet
Expand Down Expand Up @@ -293,7 +293,7 @@ class WINDECLSPEC Protocol2PacketHandler : public PacketHandler
/// @param error Dynamixel hardware error
/// @return communication results which come from Protocol2PacketHandler::readRx()
////////////////////////////////////////////////////////////////////////////////
int read1ByteRx (PortHandler *port, uint8_t *data, uint8_t *error = 0);
int read1ByteRx (PortHandler *port, uint8_t id, uint8_t *data, uint8_t *error = 0);

////////////////////////////////////////////////////////////////////////////////
/// @brief The function that calls Protocol2PacketHandler::readTxRx() function for reading 1 byte data
Expand Down Expand Up @@ -328,7 +328,7 @@ class WINDECLSPEC Protocol2PacketHandler : public PacketHandler
/// @param error Dynamixel hardware error
/// @return communication results which come from Protocol2PacketHandler::readRx()
////////////////////////////////////////////////////////////////////////////////
int read2ByteRx (PortHandler *port, uint16_t *data, uint8_t *error = 0);
int read2ByteRx (PortHandler *port, uint8_t id, uint16_t *data, uint8_t *error = 0);

////////////////////////////////////////////////////////////////////////////////
/// @brief The function that calls Protocol2PacketHandler::readTxRx() function for reading 2 byte data
Expand Down Expand Up @@ -363,7 +363,7 @@ class WINDECLSPEC Protocol2PacketHandler : public PacketHandler
/// @param error Dynamixel hardware error
/// @return communication results which come from Protocol2PacketHandler::readRx()
////////////////////////////////////////////////////////////////////////////////
int read4ByteRx (PortHandler *port, uint32_t *data, uint8_t *error = 0);
int read4ByteRx (PortHandler *port, uint8_t id, uint32_t *data, uint8_t *error = 0);

////////////////////////////////////////////////////////////////////////////////
/// @brief The function that calls Protocol2PacketHandler::readTxRx() function for reading 4 byte data
Expand Down
2 changes: 1 addition & 1 deletion c++/package.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<package>
<name>dynamixel_sdk</name>
<version>3.5.1</version>
<version>3.5.2</version>
<description>This package is wrapping version of ROBOTIS Dynamxel SDK for ROS. The ROBOTIS Dynamixel SDK, or SDK, is a software development library that provides Dynamixel control functions for packet communication. The API is designed for Dynamixel actuators and Dynamixel-based platforms.</description>
<license>BSD</license>
<author email="[email protected]">Zerom</author>
Expand Down
2 changes: 1 addition & 1 deletion c++/src/dynamixel_sdk/group_bulk_read.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ int GroupBulkRead::rxPacket()
{
uint8_t id = id_list_[i];

result = ph_->readRx(port_, length_list_[id], data_list_[id]);
result = ph_->readRx(port_, id, length_list_[id], data_list_[id]);
if (result != COMM_SUCCESS)
return result;
}
Expand Down
2 changes: 1 addition & 1 deletion c++/src/dynamixel_sdk/group_sync_read.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ int GroupSyncRead::rxPacket()
{
uint8_t id = id_list_[i];

result = ph_->readRx(port_, data_length_, data_list_[id]);
result = ph_->readRx(port_, id, data_length_, data_list_[id]);
if (result != COMM_SUCCESS)
return result;
}
Expand Down
Loading

0 comments on commit 0eb1e20

Please sign in to comment.