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

Iron Irwini support #303

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,9 @@ libmicroros_dx200_galactic/
libmicroros_yrc1000_foxy/
libmicroros_yrc1000u_foxy/
libmicroros_dx200_foxy/
libmicroros_dx200_iron/
libmicroros_yrc1000_iron/
libmicroros_yrc1000u_iron/

# M+ build output
*.out
9 changes: 9 additions & 0 deletions MotoROS2.sln
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,15 @@ Global
DX200_foxy|x86 = DX200_foxy|x86
DX200_galactic|x86 = DX200_galactic|x86
DX200_humble|x86 = DX200_humble|x86
DX200_iron|x86 = DX200_iron|x86
YRC1000_foxy|x86 = YRC1000_foxy|x86
YRC1000_galactic|x86 = YRC1000_galactic|x86
YRC1000_humble|x86 = YRC1000_humble|x86
YRC1000_iron|x86 = YRC1000_iron|x86
YRC1000u_foxy|x86 = YRC1000u_foxy|x86
YRC1000u_galactic|x86 = YRC1000u_galactic|x86
YRC1000u_humble|x86 = YRC1000u_humble|x86
YRC1000u_iron|x86 = YRC1000u_iron|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{64C31524-A3C4-49D4-AD04-955D44202226}.DX200_foxy|x86.ActiveCfg = DX200_foxy|Win32
Expand All @@ -24,18 +27,24 @@ Global
{64C31524-A3C4-49D4-AD04-955D44202226}.DX200_galactic|x86.Build.0 = DX200_galactic|Win32
{64C31524-A3C4-49D4-AD04-955D44202226}.DX200_humble|x86.ActiveCfg = DX200_humble|Win32
{64C31524-A3C4-49D4-AD04-955D44202226}.DX200_humble|x86.Build.0 = DX200_humble|Win32
{64C31524-A3C4-49D4-AD04-955D44202226}.DX200_iron|x86.ActiveCfg = DX200_iron|Win32
{64C31524-A3C4-49D4-AD04-955D44202226}.DX200_iron|x86.Build.0 = DX200_iron|Win32
{64C31524-A3C4-49D4-AD04-955D44202226}.YRC1000_foxy|x86.ActiveCfg = YRC1000_foxy|Win32
{64C31524-A3C4-49D4-AD04-955D44202226}.YRC1000_foxy|x86.Build.0 = YRC1000_foxy|Win32
{64C31524-A3C4-49D4-AD04-955D44202226}.YRC1000_galactic|x86.ActiveCfg = YRC1000_galactic|Win32
{64C31524-A3C4-49D4-AD04-955D44202226}.YRC1000_galactic|x86.Build.0 = YRC1000_galactic|Win32
{64C31524-A3C4-49D4-AD04-955D44202226}.YRC1000_humble|x86.ActiveCfg = YRC1000_humble|Win32
{64C31524-A3C4-49D4-AD04-955D44202226}.YRC1000_humble|x86.Build.0 = YRC1000_humble|Win32
{64C31524-A3C4-49D4-AD04-955D44202226}.YRC1000_iron|x86.ActiveCfg = YRC1000_iron|Win32
{64C31524-A3C4-49D4-AD04-955D44202226}.YRC1000_iron|x86.Build.0 = YRC1000_iron|Win32
{64C31524-A3C4-49D4-AD04-955D44202226}.YRC1000u_foxy|x86.ActiveCfg = YRC1000u_foxy|Win32
{64C31524-A3C4-49D4-AD04-955D44202226}.YRC1000u_foxy|x86.Build.0 = YRC1000u_foxy|Win32
{64C31524-A3C4-49D4-AD04-955D44202226}.YRC1000u_galactic|x86.ActiveCfg = YRC1000u_galactic|Win32
{64C31524-A3C4-49D4-AD04-955D44202226}.YRC1000u_galactic|x86.Build.0 = YRC1000u_galactic|Win32
{64C31524-A3C4-49D4-AD04-955D44202226}.YRC1000u_humble|x86.ActiveCfg = YRC1000u_humble|Win32
{64C31524-A3C4-49D4-AD04-955D44202226}.YRC1000u_humble|x86.Build.0 = YRC1000u_humble|Win32
{64C31524-A3C4-49D4-AD04-955D44202226}.YRC1000u_iron|x86.ActiveCfg = YRC1000u_iron|Win32
{64C31524-A3C4-49D4-AD04-955D44202226}.YRC1000u_iron|x86.Build.0 = YRC1000u_iron|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ The following general requirements must be met in order to be able to use MotoRO
- DX200: `LAN`
- YRC1000: either `LAN2` or `LAN3`
- YRC1000micro: either `LAN2` or `LAN3`
- ROS 2 version: Foxy, Galactic or Humble.
- ROS 2 version: Foxy, Galactic, Humble or Iron
MotoROS2 does not support ROS 2 Iron Irwini, nor Jazzy nor Rolling Ridley.
- Docker or a from-source build of the micro-ROS Agent
- FastDDS as RMW (even when using ROS 2 Galactic)
Expand Down Expand Up @@ -172,12 +172,15 @@ The values must match *exactly*.
| DX200 | Foxy | `mr2_dx2_f.out` | `0.1.3` | `a9a9e10403f726062c25d97654fad316` |
| DX200 | Galactic | `mr2_dx2_g.out` | `0.1.3` | `e8db7512215da240b28b985f2f2af98b` |
| DX200 | Humble | `mr2_dx2_h.out` | `0.1.3` | `611bda537655cf8a60d85600da6043f4` |
| DX200 | Iron | `mr2_dx2_i.out` | `` | `` |
| YRC1000 | Foxy | `mr2_yrc1_f.out` | `0.1.3` | `84bfb44e2043372127d9dfc1157a79b5` |
| YRC1000 | Galactic | `mr2_yrc1_g.out` | `0.1.3` | `866e090b6c724429ce03117712c951f4` |
| YRC1000 | Humble | `mr2_yrc1_h.out` | `0.1.3` | `e2d088b765a0bfed501aa213a1be1de0` |
| YRC1000 | Iron | `mr2_yrc1_i.out` | `` | `` |
| YRC1000micro | Foxy | `mr2_yrc1m_f.out` | `0.1.3` | `027e77b427a212aa63e5d7962d48ad92` |
| YRC1000micro | Galactic | `mr2_yrc1m_g.out` | `0.1.3` | `042d753a7729784fec8c5c23bef3e685` |
| YRC1000micro | Humble | `mr2_yrc1m_h.out` | `0.1.3` | `c0e61adbf5bf6fd6a734211f15bb0f0a` |
| YRC1000micro | Iron | `mr2_yrc1m_i.out` | `` | `` |

If the hash matches, proceed with the next section, [Configuration](#configuration).

Expand Down Expand Up @@ -427,8 +430,8 @@ Choose one or the other.
The command shown here starts the `humble` version of the `micro-ros-agent` Docker image.
However, always make sure to use a version of the Agent image which corresponds to the version of ROS 2 that is being used.

With ROS 2 Foxy, use `microros/micro-ros-agent:foxy`.
With ROS 2 Humble, use `microros/micro-ros-agent:humble`.
With ROS 2 Iron, use `microros/micro-ros-agent:iron`.

To start the Agent (on a machine with Docker already installed and setup to allow non-root access):

Expand All @@ -453,8 +456,8 @@ This procedure is rather involved, so only do this if the pre-configured Docker
The following sections show how to build the Humble version of the Agent in a dedicated workspace (adapt the paths used below if a different workspace should be used instead).

Note: always make sure to use a version of the Agent which corresponds to the version of ROS 2 that is being used.
For ROS 2 Foxy, checkout the `foxy` branch.
For ROS 2 Humble, checkout the `humble` branch.
For ROS 2 Iron, checkout the `iron` branch.

#### Linux (Debian/Ubuntu)

Expand Down Expand Up @@ -544,7 +547,7 @@ After the final reboot of the controller, and after [starting the micro-ROS Agen

Note: if you are using ROS 2 Galactic, please first read [Only FastDDS is supported](#only-fastdds-is-supported).

On a PC with a supported ROS 2 installation (ie: Foxy, Galactic (with FastDDS) or Humble):
On a PC with a supported ROS 2 installation (ie: Foxy, Galactic (with FastDDS), Humble or Iron):

1. open a new terminal
1. `source` the ROS 2 installation
Expand Down Expand Up @@ -732,7 +735,7 @@ None of the other RMWs are supported, including Cyclone DDS, which is the defaul

Symptoms of this incompatibility are seemingly functional ROS 2 network connections, where topics are succesfully published and subscribed to, but service invocations and action goal submissions appear to *hang*.

**Note**: ROS 2 Foxy, ROS 2 Humble and ROS 2 Rolling all use FastDDS by default.
**Note**: ROS 2 Foxy, ROS 2 Humble, ROS2 Iron and ROS 2 Rolling all use FastDDS by default.
If you haven't changed your default RMW, you should not need to change anything for MotoROS2.

**Work-around**: unfortunately, this limitation is caused by a middleware-layer incompatibility with respect to how service requests are (de)serialised by the respective RMWs ([ros2/rmw_cyclonedds#184](https://github.com/ros2/rmw_cyclonedds/issues/184)), and without significant changes to the way MotoROS2 operates, has no known work-around.
Expand Down
2 changes: 2 additions & 0 deletions config/motoros2_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
#-----------------------------------------------------------------------------
# Remap rules to apply to ROS 2 resource names.
#
# (NOT COMPATIBLE WITH IRON IRWINI)
#
# This configures the micro-ROS equivalent of the ROS 2 remap functionality.
#
# The current implementation expects all remap rules as a single,
Expand Down
2 changes: 1 addition & 1 deletion doc/build_from_source.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The MotoPlus SDK is not compatible with Visual Studio Code.
- **MotoPlus SDK for Visual Studio v1.5.1 or higher**.
This is not the same as MotoPlus IDE. Users in Asian regions will need to purchase this software from [Yaskawa America directly](https://www.motoman.com/en-us/products/robots/sales-quote).
If you already have a license for an older version of the MotoPlus SDK, please contact `techsupport@motoman.com` or `ccs@yaskawa.eu` for assistance obtaining a newer edition.
- **libmicroros library and headers** that corresponds to your target edition of ROS 2 (Foxy, Humble, etc) and the Yaskawa controller series you are building MotoROS2 for
- **libmicroros library and headers** that corresponds to your target edition of ROS 2 (Humble, Iron, etc) and the Yaskawa controller series you are building MotoROS2 for
Although `libmicroros` as used by MotoROS2 is derived from the open-source [micro-ROS](https://micro.ros.org) project, various patches were needed to make it compatible with MotoPlus. As of writing, these patches can not be made open-source yet. Because of this, we distribute the `libmicroros` dependency as a closed-source library.
These can be found on the [micro_ros_motoplus/Releases](https://github.com/yaskawa-global/micro_ros_motoplus/releases) page.

Expand Down
6 changes: 5 additions & 1 deletion src/CommunicationExecutor.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ void Ros_Communication_Initialize()
Ros_Debug_BroadcastMsg("rclc_support_init_with_options = %d", (int)ret);
motoRosAssert(ret == RCL_RET_OK, SUBCODE_FAIL_SUPPORT_INIT);

rcl_node_options_t node_options = rcl_node_get_default_options();
#ifndef MOTOPLUS_LIBMICROROS_ROS2_IS_IRON
//construct a faux command line to pass to rcl_parse_arguments(..)
char* faux_argv[MAX_REMAP_RULE_NUM];
size_t faux_argc = 0;
Expand All @@ -157,7 +159,6 @@ void Ros_Communication_Initialize()
faux_argc = Ros_ConstructFauxArgv(
remap_rules_str_, faux_argv, MAX_REMAP_RULE_NUM);

rcl_node_options_t node_options = rcl_node_get_default_options();
if (faux_argc > 0)
{
//parse the just constructed argv
Expand All @@ -171,6 +172,7 @@ void Ros_Communication_Initialize()
node_options = rcl_node_get_default_options();
}
}
#endif

//init node with the remap rules and other options from the config file
ret = rclc_node_init_with_options(
Expand All @@ -182,7 +184,9 @@ void Ros_Communication_Initialize()

//we're done with it
ret = rcl_node_options_fini(&node_options); RCL_UNUSED(ret);
#ifndef MOTOPLUS_LIBMICROROS_ROS2_IS_IRON
Ros_CleanupFauxArgv(faux_argv, faux_argc);
#endif

MOTOROS2_MEM_TRACE_REPORT(comm_exec_init);
}
Expand Down
1 change: 1 addition & 0 deletions src/DX200_ironCompilerArguments.mps
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-DDX200 -DMOTOROS2_MEM_TRACE_ENABLE -std=gnu99 -march=atom -nostdlib -fno-builtin -fno-defer-pop -fno-implicit-fp -fno-zero-initialized-in-bss -Wall -Werror-implicit-function-declaration -DCPU=_VX_ATOM -DTOOL_FAMILY=gnu -DTOOL=gnu -D_WRS_KERNEL -I "~ProjectDir~" ~AdditionalIncludeDir~ -isystem "~IncludeDir~" -O0 ~ObjFileInfo~ -c "~FilePath~"
1 change: 1 addition & 0 deletions src/DX200_ironLinkerArguments.mps
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-std=gnu99 -nostdlib -r -Wl,--discard-locals -Wl,--entry=mpUsrRoot ~FileList~ -o "~OutputPath~"
3 changes: 3 additions & 0 deletions src/FauxCommandLineArgs.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <string.h>
#include <rcutils/strdup.h>

#ifndef MOTOPLUS_LIBMICROROS_ROS2_IS_IRON

//TODO: Once https://github.com/ros2/rcl/issues/998 is addressed, this would no longer
// be necessary. We could construct rcl_remap_t instances directly without having
Expand Down Expand Up @@ -107,3 +108,5 @@ void Ros_CleanupFauxArgv(char** arr, size_t arr_len)
g_motoros2_Allocator.deallocate(arr[i], g_motoros2_Allocator.state);
}
}

#endif // MOTOPLUS_LIBMICROROS_ROS2_IS_IRON
Loading