ROS connection to ABB IRB120
Hello,
I'm trying to connect ROS to my ABB IRB120 robot. I followed both tutorials ( http://wiki.ros.org/abb/Tutorials/InstallServer and http://wiki.ros.org/abb/Tutorials/RunServer). When I boot up my IRC5 controller is does say "Waiting for ROS connection", so that parts works.
I also installed the ABB package (https://github.com/ros-industrial/abb) and the ABB experimental package (https://github.com/ros-industrial/abb_experimental).
Now I'm kinda stuck. How do I connect to the robot? Which parameters/settings do I need to change? I'm new to ROS.
I'm using ROS melodic with Ubuntu 18.04.
Kind regards
Asked by Redouanr21 on 2018-10-15 09:42:11 UTC
Answers
The tutorials assume a certain level of experience with other ROS packages, so if you don't have that, it's easy to get confused.
After installing all the necessary files on the controller, you'll need to start the appropriate launch file on the ROS PC. For your IRB 120, that would be robot_interface_download_irb120_3_58.launch which is provided by the abb_irb120_support
package.
So after building your workspace with the abb
and abb_experimental
repositories cloned into it, you source /path/to/your/workspace/devel/setup.bash
and then:
roslaunch abb_irb120_support robot_interface_download_irb120_3_58.launch robot_ip:=<IP_OF_YOUR_ROBOT>
where you replace <IP_OF_YOUR_ROBOT>
with the actual IP of your IRC5 controller.
If that is successful you should now have a few topics publishing information (general robot/controller status and a JointState
topic) and a new action server of the control_msgs/FollowJointTrajectory type.
This last one you can send trajectories to and the driver will start executing them.
A popular choice for software that can generate such trajectories for you is MoveIt and for the IRB 120 a MoveIt configuration package is provided in the abb_experimental
repository. You should be able to start it -- after having shutdown the previous launchfile -- with:
roslaunch abb_irb120_moveit_config moveit_planning_execution.launch robot_ip:=<IP_OF_YOUR_ROBOT>
where again you replace <IP_OF_YOUR_ROBOT>
with the actual IP of your IRC5 controller.
At this point you can plan and execute motions with MoveIt.
Please always keep robot safety in mind especially if you run things in auto mode.
Finally, see Working with ROS-Industrial Robot Support Packages for more information on how to use ROS-Industrial robot support packages and see wiki/abb_driver for more information about the nodes in abb_driver
and which information they publish and subscribe.
Asked by gvdhoorn on 2018-10-15 10:25:35 UTC
Comments
Note btw:
I'm using ROS melodic with Ubuntu 18.04.
the ABB packages have not been released into Melodic nor have they been extensively tested with it. You might run into issues trying to use them.
Asked by gvdhoorn on 2018-10-15 10:28:20 UTC
I was able to connect to the robot so thats works, I also was able to run it with Moveit. Everything works fine. But now I want to control the robot through code. I know I need a action client that communicates with the action server of the FollowJointTracjetory.
Asked by Redouanr21 on 2018-11-12 06:33:39 UTC
Part 2:
And I need to write it to the goal. But my question now is, is there somewher an example code which I can run so the robot will move to a random position by code?
Asked by Redouanr21 on 2018-11-12 06:33:48 UTC
One thing I coudnt figure out it. You said I should run roslaunch abb_irb120_moveit_config moveit_planning_execution.launch robot_ip:=
Asked by Redouanr21 on 2018-11-16 05:33:58 UTC
Is ip_of_your_robot
the actual IP of the robot? IRC5 controllers have multiple ethernet ports, not all of which are connected to the same (internal) network. You'll want to use the correct one (not the service port fi).
Asked by gvdhoorn on 2018-11-16 06:05:25 UTC
I managed to connect to robot with MoveIt. I see the actual robot in his current position. Now when I plan and execute a position, I get some info on the flexpendant. It says start received and sending xxx points to Motion task. But the robot doesnt move.
Asked by Redouanr21 on 2018-11-16 06:14:35 UTC
Sometimes I dont get the info on the flexpendant but I get this error:
[ERROR] [1542366774.450927329]: Controller is taking too long to execute trajectory (the expected upper bound for the trajectory execution was 2.288109 seconds). Stopping trajectory.
Asked by Redouanr21 on 2018-11-16 06:15:08 UTC
re: controller is taking too long: you need to disable "trajectory execution monitoring" with MoveIt, as abb_driver
is not performant enough and the robot will move too slowly. See #q196586 for how to do it from a launch file.
Asked by gvdhoorn on 2018-11-16 12:44:50 UTC
re: the robot doesn't move: make sure you have started the main task. See the Robot Motion Task section of the Running the ROS Server tutorial.
Also: you could be running into https://github.com/ros-industrial/abb/pull/155.
Asked by gvdhoorn on 2018-11-16 12:46:13 UTC
After you run the codes, you should press the PLAY button on the FlexPendant. Otherwise, the ABB Controller is just connecting to the PC but the robot does not execute any movement. It will wait you several seconds, then it fails due to timeout.
Asked by Archilles on 2019-08-22 03:09:42 UTC
Comments