Well, I have programmed a SCARA using the controller, and then invoke the programs stored in the controller from my ros node using tcp communication
So basically if you are doing a pick and place action, you program your overall action and break into several programs like
1. Goto overhead position 1 (program1)
2. Pick from the table (program2)
3. Goto overhead position 1 (program3)
4. Got overhead position 2 (program4)
5. Place on the table (program5)
6. Retract to home (program6)
and save these program in your controller with the respective name. Using TCP protocol and read the manual to find out which commands you want to use to send in signals from your computer to the Yamaha controller to invoke your programs.
Now write a state machine in your chose language which would invoke this programs. Run the state machine in the ROS. You can use actionlib for performing the same. Put the Yamaha into AUTO mode when you are sending a command from your ROS interface using your TCP socket bridge.
As a comment, as I don't want to discourage others from answering: a quick Google does not show any readily available pkgs for this robot. The controller looks rather old.
To use this with ROS, you'll have to create a driver component yourself. A driver transforms ROS 'motion commands' into ..
.. commands that the RCX142 understands. It also transforms position output (ie: joint states) of the robot controller into ROS sensor messages. You'll have to figure out if that is possible. Use serial port or ethernet port.
Alternative: write off-line program generator that transforms ..
.. ROS trajectories into programs for the robot. Then execute entire programs as a whole. You would not have robot joint states in RViz (for instance) that way, but you could control the robot.
thanks a lot