Closed joedavid-tuni closed 2 months ago
Did you get this working?
Yes, I did. This happened because the RAPID program didn't setup the egm correctly from the controller end when I used the bloated code from the state machine add-in. I wrote a minimal code with the help of the abb egm manual and it worked well.
Okay got it. I am currently facing the same issue, do you mind sharing the code please, would be a huge help. Thanks for answering!
I figured it out myself, thanks!
@SagarJoshi73249 you should share your solution here so that other people who run into the issue later can benefit from your fix.
@SagarJoshi73249 @joedavid-tuni Hey, could one of you post a solution so that just like @Yadunund said we all benefit from your fix?
I am on holidays since a month and I don't have access to my computer. I can put my code here in a week if nobody else does it sooner. Please feel free to remind me then if I haven't done so.
I've looked into this together with @SyZbidi.
For those of you trying to use this driver with the State Machine add-in that was used with abb_robot_driver (ie: the ROS 1 version), the issue is that the README of abb_ros2
doesn't document the fact you need to instruct the State Machine add-in to start an EGM session for you.
If you don't, it will simply just sit there, idling away.
This will cause ABBSystemHardware
to keep waiting on an EGM connection from the ABB controller (here), while the ABB controller / State Machine keeps waiting for 'someone' or 'something' to ask it to start an EGM session. Basically a catch 22 (both sides waiting on each other).
In the ROS 1 version of the driver, you'd use the services offered by the abb_rws_service_provider
to coordinate the State Machine add-in. Specifically, you'd call start_egm_joint
service which would instruct the State Machine to (in the end) activate the EGM session, causing it to try to connect to the UDP port the driver is listening on.
Technically this is of course not dependant on the State Machine add-in, and I assume the maintainers/developers of abb_ros2
instead used a 'simple' RAPID program which just configures and starts an EGM session directly (this one fi). For that to work, you need to make sure to start that on the ABB controller after you've started the ABBSystemHardware
, and you can't use the State Machine add-in (nor the abb_rws_service_provider
).
So tl;dr:
/rws_client/start_egm_joint
to start an EGM joint sessionRegardless of whether you use the State Machine add-in or not, after starting the EGM session (and assuming all other configuration on the ABB controller and on the abb_ros2
side is correct) you should see ABBSystemHardware
reporting:
(note that even if it didn't successfully connected, it still printed that for me/us, so I'm not sure how reliable those log lines are)
At this point the Controller Manager should also be available and it should be able to spawn controllers.
In both cases you'll probably need to update the EGM settings, as otherwise maximum motion speed will be very low (1 deg/s IIRC) and it will appear the robot is not moving at all. Maximum convergence time might also be something to change, as it will make EGM sessions time-out relatively quickly.
With the State Machine add-in, you can do that using /rws_client/get_egm_settings
and /rws_client/set_egm_settings
.
If you're using a stand-alone RAPID program, you'll likely have to configure EGM using RobotStudio, or as part of the RAPID program.
For the ROS 1 driver, you could automate all this using something like sam-xl/abb_robot_driver_state_machine. Unfortunately this isn't compatible with abb_ros2
.
Finally:
@joedavid-tuni wrote:
This happened because the RAPID program didn't setup the egm correctly from the controller end when I used the bloated code from the state machine add-in. I wrote a minimal code with the help of the abb egm manual and it worked well.
I don't dismiss your experience, but AFAICT, there's nothing wrong with the State Machine add-in, and it's definitely usable with abb_ros2
. It might be bloated compared to the (very minimal) .mod
provided here in this repository, but it also offers much more functionality (such as retrieving and updating EGM settings).
What you just need to remember is to start the RWS client and use the appropriate services to coordinate the State Machine in order for it to 'play nice' with abb_ros2
.
You absolutely don't have to use the State Machine add-in of course.
While working with a real irc5 controller, with ros humble on Ubuntu 22.04, I get the following error