ros-industrial / abb_driver

(old) ROS driver for ABB IRC5 / RW5 or RW6 controllers (Simple Message & RAPID)
http://wiki.ros.org/abb_driver
29 stars 17 forks source link

Using abb_driver to publish a trajectory via rosserial over tcp to serial with an S4 Controller #14

Closed muesgit closed 3 years ago

muesgit commented 3 years ago

Since there is no solution for direct serial communication of the 'abb_driver' with older ABB controllers which dont support a tcp connection i want to find a solution to publish a trajectory in ROS to an "arduino node" via TCP (Ethernet Shield) and redirect it via serial RS232 connection to the S4 Controller where I can extract the points in a loop to let the robot executing them.

Hardware:

Here is the basic scheme on how i would like to solve the problem:

  1. Use the ROS-Indutrial support for ABB IRB 4400
  2. Streaming unidirectional for the beginning (is it possible to use the streaming interface for that?)
  3. Fit the datastream on the Arduino for RAPID if necessary
  4. Redirect it to serial port
  5. Write a loop in RAPID to read the Path.
  6. If possible publish the final position of the robot back to ROS.

I can already publish a message via tcp by using 'rosserial_python' to the serial output. Does anyone have some recomendations on how to go on especially on ROS side.

gavanderhoorn commented 3 years ago

This is not something the nodes we provide here would be able to do in their current implementation.

You'll probably have to replace the motion_download_interface with a custom one, and perhaps also the robot_state node.

You'd need two new nodes which only use topics to communicate with your rosserial_arduino node running on your mega.

If you publish and subscribe to the same topics as the nodes you're replacing, you should be able to reuse the joint_trajectory_action node.

But that would give you access to the ROS messages used to communicate the trajectory and the robot state.

You'd then subscribe to incoming trajectory msgs, unpack them and somehow send the individual "setpoints" (ie: JointTrajectoryPoints) to the S4. On the S4 side you'd need specialised RAPID to receive that point and the execute a joint move to it.

Seeing as you don't have multitasking, you'd probably need to run a single while-loop which both receives new traj pts and also sends out current state. That current state could then be read by your mega again, reformatted into a JointState message and published to the regular topic(s).

gavanderhoorn commented 3 years ago

I've marked this as wontfix as it's not really an issue with the package in this repository, but a question about an alternative implementation of the same / similar communication infrastructure.

I'm also going to the close issue because of that.

That doesn't mean you can't continue commenting on it of course, so feel free to do so.