Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ros2 devel #365

Merged
merged 5 commits into from
Oct 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/dynamixel_workbench.repos
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
repositories:
dynamixel_workbench/dynamixel_workbench_msgs:
type: git
url: https://github.com/ROBOTIS-GIT/dynamixel-workbench-msgs.git
version: ros2
36 changes: 20 additions & 16 deletions .github/workflows/ros-ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: ros2-ci
name: ros2

# Controls when the action will run. Triggers the workflow on push or pull request
on:
Expand All @@ -15,17 +15,25 @@ jobs:
fail-fast: false
matrix:
ros_distribution:
# - foxy
# - galactic
- foxy
- galactic
- humble
- rolling
include:
# - docker_image: ubuntu:focal
# ros_distribution: foxy
# ros_version: 2
# - docker_image: ubuntu:focal
# ros_distribution: galactic
# ros_version: 2
- docker_image: ubuntu:focal
# Foxy Fitzroy (June 2020 - May 2023)
- docker_image: rostooling/setup-ros-docker:ubuntu-focal-ros-foxy-ros-base-latest
ros_distribution: foxy
ros_version: 2
# Galactic Geochelone (May 2021)
- docker_image: rostooling/setup-ros-docker:ubuntu-focal-ros-galactic-ros-base-latest
ros_distribution: galactic
ros_version: 2
# Humble Hawksbill (May 2027)
- docker_image: rostooling/setup-ros-docker:ubuntu-jammy-ros-humble-ros-base-latest
ros_distribution: humble
ros_version: 2
# Rolling
- docker_image: rostooling/setup-ros-docker:ubuntu-jammy-ros-rolling-ros-base-latest
ros_distribution: rolling
ros_version: 2
container:
Expand All @@ -37,13 +45,9 @@ jobs:
uses: actions/checkout@v2
with:
path: ros_ws/src
- name: Setup ROS2 environment
uses: ros-tooling/[email protected]
with:
required-ros-distributions: ${{ matrix.ros_distribution }}
- name: Build and Test
uses: ros-tooling/action-ros-ci@v0.2
uses: ros-tooling/action-ros-ci@0.2.6
with:
package-name: dynamixel_workbench
target-ros2-distro: ${{ matrix.ros_distribution }}
vcs-repo-file-url: ""
vcs-repo-file-url: "https://raw.githubusercontent.com/ROBOTIS-GIT/dynamixel-workbench/ros2-devel/.github/workflows/dynamixel_workbench.repos"
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
[![kinetic-devel Status](https://github.com/ROBOTIS-GIT/dynamixel-workbench/workflows/kinetic-devel/badge.svg)](https://github.com/ROBOTIS-GIT/dynamixel-workbench/tree/kinetic-devel)
[![melodic-devel Status](https://github.com/ROBOTIS-GIT/dynamixel-workbench/workflows/melodic-devel/badge.svg)](https://github.com/ROBOTIS-GIT/dynamixel-workbench/tree/melodic-devel)
[![noetic-devel Status](https://github.com/ROBOTIS-GIT/dynamixel-workbench/workflows/noetic-devel/badge.svg)](https://github.com/ROBOTIS-GIT/dynamixel-workbench/tree/noetic-devel)

[![foxy-devel Status](https://github.com/ROBOTIS-GIT/dynamixel-workbench/workflows/foxy-devel/badge.svg)](https://github.com/ROBOTIS-GIT/dynamixel-workbench/tree/foxy-devel)
[![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)
[![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
Expand Down
6 changes: 6 additions & 0 deletions dynamixel_workbench/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
Changelog for package dynamixel_workbench
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

2.2.3 (2022-10-06)
------------------
* ROS2 release (Foxy, Galactic, Humble)
* fix variable length warning (#364)
* Contributoers: Kenji Brameld, Will Son

2.2.2 (2022-01-25)
------------------
* ROS2 package update only
Expand Down
5 changes: 2 additions & 3 deletions dynamixel_workbench/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>dynamixel_workbench</name>
<version>2.2.2</version>
<version>2.2.3</version>
<description>
Dynamixel-Workbench is dynamixel solution for ROS.
This metapackage allows you to easily change the ID, baudrate and operating mode of the Dynamixel.
Expand All @@ -12,12 +12,11 @@
<maintainer email="[email protected]">Will Son</maintainer>
<license>Apache 2.0</license>
<url type="website">http://wiki.ros.org/dynamixel_workbench</url>
<url type="emanual">http://emanual.robotis.com/docs/en/software/dynamixel/dynamixel_workbench/</url>
<url type="repository">https://github.com/ROBOTIS-GIT/dynamixel-workbench</url>
<url type="bugtracker">https://github.com/ROBOTIS-GIT/dynamixel-workbench/issues</url>
<author email="[email protected]">Darby Lim</author>
<author email="[email protected]">Ryan Shim</author>
<author email="[email protected]">Will Son</author>
<author>Ryan Shim</author>
<buildtool_depend>ament_cmake</buildtool_depend>
<exec_depend>dynamixel_workbench_toolbox</exec_depend>
<export>
Expand Down
6 changes: 6 additions & 0 deletions dynamixel_workbench_toolbox/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
Changelog for package dynamixel_workbench_toolbox
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

2.2.3 (2022-10-06)
------------------
* ROS2 release (Foxy, Galactic, Humble)
* fix variable length warning (#364)
* Contributoers: Kenji Brameld, Will Son

2.2.2 (2022-01-25)
------------------
* ROS2 package update only
Expand Down
8 changes: 7 additions & 1 deletion dynamixel_workbench_toolbox/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@ if(NOT CMAKE_CXX_STANDARD)
endif()

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
add_compile_options(-Wall -Wextra -Wpedantic)
endif()

if(MSVC)
add_compile_definitions(
_USE_MATH_DEFINES
)
endif()

################################################################################
Expand Down
4 changes: 2 additions & 2 deletions dynamixel_workbench_toolbox/library.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name=DynamixelWorkbench
version=0.1.0
version=2.2.3
author=Darby Lim ([email protected])
maintainer=Pyo (pyo@robotis.com)
maintainer=Will Son (willson@robotis.com)
sentence=DynamixelWorkbench using DynamixelSDK
paragraph=Tools for Dynamixel
category=Other
Expand Down
2 changes: 1 addition & 1 deletion dynamixel_workbench_toolbox/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>dynamixel_workbench_toolbox</name>
<version>2.2.2</version>
<version>2.2.3</version>
<description>
This package is composed of 'dynamixel_item', 'dynamixel_tool', 'dynamixel_driver' and 'dynamixel_workbench' class.
The 'dynamixel_item' is saved as control table item and information of DYNAMIXEL.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

/* Authors: Taehun Lim (Darby) */

#include <memory>
#include "../../include/dynamixel_workbench_toolbox/dynamixel_driver.h"

DynamixelDriver::DynamixelDriver() : tools_cnt_(0),
Expand Down Expand Up @@ -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<uint8_t> 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)
{
Expand Down Expand Up @@ -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<uint8_t> multi_parameter(4*data_num_for_each_id);
uint8_t cnt = 0;

for (int i = 0; i < id_num; i++)
Expand All @@ -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";
Expand Down