资讯
Friendly ROS 2 Humble integration for controlling FANUC robots through fanucpy/MAPPDK. Includes robot state, teleoperation, I/O, TP programs, RViz2 visualization, and MoveIt 2 execution.
📌 概要
<h1><a class="anchor" href="https://discourse.openrobotics.org#p-117296-fanucpy_ros2-a-ros-2-interface-tested-with-an-older-fanuc-r-30ia-mate-controller-1" name="p-117296-fanucpy_ros2-a-ros-2-interfac
<h1><a class="anchor" href="https://discourse.openrobotics.org#p-117296-fanucpy_ros2-a-ros-2-interface-tested-with-an-older-fanuc-r-30ia-mate-controller-1" name="p-117296-fanucpy_ros2-a-ros-2-interface-tested-with-an-older-fanuc-r-30ia-mate-controller-1"></a>fanucpy_ros2: A ROS 2 interface tested with an older FANUC R-30iA Mate controller</h1>
<p>Hello ROS community,</p>
<p>I would like to share <a href="https://github.com/Ureed-Hussain/fanucpy_ros2" rel="noopener nofollow ugc"><code>fanucpy_ros2</code></a>, an independent ROS 2 interface that I developed and tested with a FANUC M-10iA robot and an R-30iA Mate controller.</p>
<h2><a class="anchor" href="https://discourse.openrobotics.org#p-117296-motivation-2" name="p-117296-motivation-2"></a>Motivation</h2>
<p>While working with this robot, I wanted to integrate it into a ROS 2 Humble environment for monitoring, motion commands, visualization, and MoveIt 2 planning.</p>
<p>My available controller is an R-30iA Mate running software version V7.70P/56. This configuration falls outside the controller families and minimum software versions listed in the current <a href="https://fanuc-corporation.github.io/fanuc_driver_doc/main/docs/quick_start/quick_start.html#robot-controller-setup" rel="noopener nofollow ugc">official FANUC ROS 2 driver documentation</a>.</p>
<p>This does not indicate a problem with the official driver; its documented requirements simply do not cover the older controller available in my setup.</p>
<p>I therefore investigated <a href="https://github.com/torayeff/fanucpy" rel="noopener nofollow ugc"><code>fanucpy</code></a>, an existing Python library developed by Agajan Torayev and its contributors. It provides communication with a FANUC controller using controller-side programs and a TCP connection.</p>
<p>Using <code>fanucpy</code> as the underlying communication layer, I developed <code>fanucpy_ros2</code> to expose selected robot and controller functionality through standard ROS 2 concepts.</p>
<p>This is a community-developed project. It is not an official FANUC driver and is not intended to replace the official FANUC ROS 2 driver.</p>
<h2><a class="anchor" href="https://discourse.openrobotics.org#p-117296-package-overview-3" name="p-117296-package-overview-3"></a>Package overview</h2>
<p>The current communication architecture is:</p>
<pre><code class="lang-plaintext">ROS 2 applications or MoveIt 2
|
Topics, services and actions
|
fanucpy_ros2 driver
|
fanucpy
|
Controller-side MAPPDK server
|
FANUC controller
</code></pre>
<p>A single ROS 2 driver node owns and manages the connection to the controller. It publishes robot state and provides controlled interfaces for supported controller operations and robot motion.</p>
<p>The repository currently contains eight ROS 2 packages covering the driver, custom interfaces, launch configuration, examples, trajectory execution, RViz visualization, controller utilities, and MoveIt 2 integration.</p>
<h2><a class="anchor" href="https://discourse.openrobotics.org#p-117296-main-features-4" name="p-117296-main-features-4"></a>Main features</h2>
<p>The current implementation provides:</p>
<ul>
<li>Joint-state publishing through <code>/joint_states</code></li>
<li>Cartesian state and ROS <code>PoseStamped</code> publishing</li>
<li>Driver connection and configuration status</li>
<li>Numeric-register read and gated write services</li>
<li>Digital-output read and gated write services</li>
<li>Configurable digital gripper control</li>
<li>Relative Cartesian movement through a ROS 2 action</li>
<li>Allowlisted TP program execution</li>
<li>A standard <code>FollowJointTrajectory</code> action for MoveIt 2 integration</li>
<li>RViz visualization using live robot feedback</li>
<li>MoveIt 2 configurations for mock and real-hardware modes</li>
<li>Keyboard Cartesian teleoperation and controller utility examples</li>
<li>Automatic reconnection following ordinary communication failures</li>
<li>Validation of motion requests, joint limits, velocities, frames and trajectory waypoints</li>
</ul>
<p>Controller writes, robot motion and TP program execution have independent enable parameters, and all are disabled by default.</p>
<p>The current release is version <code>0.8.0</code> and is distributed under the Apache License 2.0.</p>
<h2><a class="anchor" href="https://discourse.openrobotics.org#p-117296-tested-environment-5" name="p-117296-tested-environment-5"></a>Tested environment</h2>
<p>The package has been physically tested using the following configuration:</p>
<div class="md-table">
<table>
<thead>
<tr>
<th>Component</th>
<th>Tested configuration</th>
</tr>
</thead>
<tbody>
<tr>
<td>Robot</td>
<td>FANUC M-10iA</td>
</tr>
<tr>
<td>Controller</td>
<td>FANUC R-30iA Mate</td>
</tr>
<tr>
<td>Controller software</td>
<td>V7.70P/56</td>
</tr>
<tr>
<td>Controller options used</td>
<td>R632 KAREL and R648 User Socket Messaging</td>
</tr>
<tr>
<td>Operating system</td>
<td>Ubuntu 22.04</td>
</tr>
<tr>
<td>ROS distribution</td>
<td>ROS 2 Humble</td>
</tr>
<tr>
<td>Python</td>
<td>System Python 3.10</td>
</tr>
<tr>
<td>Communication</td>
<td><code>fanucpy</code> with a controller-side MAPPDK server</td>
</tr>
</tbody>
</table>
</div><p>This table describes only my tested configuration. I have not established compatibility with other FANUC controller families, software versions, robot models or ROS 2 distributions.</p>
<h2><a class="anchor" href="https://discourse.openrobotics.org#p-117296-moveit-2-integration-6" name="p-117296-moveit-2-integration-6"></a>MoveIt 2 integration</h2>
<p>The repository includes a MoveIt 2 configuration for the FANUC M-10iA with both mock and real-hardware launch modes.</p>
<p>In real-hardware mode, MoveIt sends trajectories through the standard <code>FollowJointTrajectory</code> action provided by the driver. The current execution method uses validated point-to-point controller commands rather than a hard real-time streaming interface.</p>
<p>The included robot model is useful for planning and visualization, but users must verify the joint limits, coordinate frames, tooling, mounting and collision geometry against their own physical installation.</p>
<h2><a class="anchor" href="https://discourse.openrobotics.org#p-117296-scope-and-limitations-7" name="p-117296-scope-and-limitations-7"></a>Scope and limitations</h2>
<p>This package depends on the communication protocol and controller-side programs provided by <code>fanucpy</code>. It is a request-response TCP interface and does not provide hard real-time or high-bandwidth streaming control.</p>
<p>At present, hardware testing is limited to my specific M-10iA and R-30iA Mate configuration. The automated tests use simulated transports and configuration checks rather than a physical FANUC controller.</p>
<p>The software validation and enable gates are additional engineering precautions, not replacements for FANUC safety functions, physical safeguarding or a proper workcell risk assessment. Any physical testing should be performed at reduced speed by someone familiar with the controller, with the teach pendant and emergency stop accessible.</p>
<h2><a class="anchor" href="https://discourse.openrobotics.org#p-117296-repository-and-demonstration-8" name="p-117296-repository-and-demonstration-8"></a>Repository and demonstration</h2>
<ul>
<li><a href="https://github.com/Ureed-Hussain/fanucpy_ros2" rel="noopener nofollow ugc">GitHub repository</a></li>
<li><a href="https://github.com/user-attachments/assets/00c2d331-1b5b-4cf0-913a-09fb140dd65a" rel="noopener nofollow ugc">Hardware demonstration video</a></li>
<li><a href="https://github.com/Ureed-Hussain/fanucpy_ros2/blob/main/docs/controller_setup.md" rel="noopener nofollow ugc">Controller setup guide</a></li>
<li><a href="https://github.com/Ureed-Hussain/fanucpy_ros2/blob/main/docs/moveit_quickstart.md" rel="noopener nofollow ugc">MoveIt 2 quick-start guide</a></li>
<li><a href="https://github.com/torayeff/fanucpy" rel="noopener nofollow ugc">Original fanucpy project</a></li>
<li><a href="https://fanuc-corporation.github.io/fanuc_driver_doc/main/docs/quick_start/quick_start.html#robot-controller-setup" rel="noopener nofollow ugc">Official FANUC ROS 2 documentation</a></li>
</ul>
<p>The README and documentation contain the complete installation, controller configuration, safety checks and usage instructions.</p>
<h2><a class="anchor" href="https://discourse.openrobotics.org#p-117296-feedback-9" name="p-117296-feedback-9"></a>Feedback</h2>
<p>I would appreciate feedback from ROS 2, MoveIt and ROS-Industrial users, especially regarding:</p>
<ul>
<li>The ROS 2 interface design</li>
<li>The trajectory-execution approach</li>
<li>Controller connection and recovery</li>
<li>Safety-related configuration</li>
<li>Experiences with other older FANUC controller configurations</li>
</ul>
<p>Reports from other FANUC installations would be particularly helpful when accompanied by the robot model, controller family, controller software version, installed options and test scope.</p>
<p>Issues, documentation improvements and pull requests are welcome through the GitHub repository.</p>
<p><small>1 post - 1 participant</small></p>
<p><a href="https://discourse.openrobotics.org/t/friendly-ros-2-humble-integration-for-controlling-fanuc-robots-through-fanucpy-mappdk-includes-robot-state-teleoperation-i-o-tp-programs-rviz2-visualization-and-moveit-2-execution/57682">Read full topic</a></p>