-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Adds robot status publishing #144
WIP: Adds robot status publishing #144
Conversation
Also fixes some tabs to spaces.
@@ -29,7 +29,7 @@ MODULE ROS_socket(SYSMODULE) | |||
|
|||
PROC ROS_init_socket(VAR socketdev server_socket, num port) | |||
IF (SocketGetStatus(server_socket) = SOCKET_CLOSED) SocketCreate server_socket; | |||
IF (SocketGetStatus(server_socket) = SOCKET_CREATED) SocketBind server_socket, GetSysInfo(\LanIp), port; | |||
IF (SocketGetStatus(server_socket) = SOCKET_CREATED) SocketBind server_socket, "192.168.1.42", port; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a known hack we have to make things work in our hardware setup, but will be removed for the final PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't this hack be replaced with "0.0.0.0" and it will generally bind to all interfaces? I tried it on RobotStudio and it works, I haven't had time to test on real hardware yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should be no need. If you have your controller setup properly (ie: not using any internal interfaces, which is why @yamokosk needs this), GetSysInfo(\LanIp)
actually returns the correct IP.
Binding on all interfaces could work (not sure whether RW likes that), but I'm not a fan.
abb_driver/rapid/ROS_stateServer.mod
Outdated
|
||
! TODO: in_motion | ||
|
||
!IF (ROS_new_trajectory) THEN |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This logic is problematic on real hardware. It keep trajectories from being executed.
Thanks for the PR @yamokosk, this is much appreciated. I just wanted to let you know we've seen the PR, and it will be reviewed some time soon. |
@yamokosk wrote:
most industrial robots have some built-in way to signal that the robot (or more precisely: a specific motion-group) is moving. I haven't checked, but perhaps ABB controllers have something similar. @jontje, would you know of something we could use? |
@yamokosk and @gavanderhoorn, you can for example do something like the following. In RobotStudio, under the Controller tab -> Configuration Editor -> I/O System:
|
@gavanderhoorn How about something like |
Isn't that exactly what @jontje suggests? |
Btw, I'd like to request that you split the whitespace changes and the functional changes in different commits. There aren't that many functional changes, but the diff is considerable as there are many tabs->spaces changes. |
@gavanderhoorn you could add |
@gonzalocasas: thanks, that is indeed how I do this normally, but in this case it'd be nice to split them out, as it will make forward/backporting easier / less messy. And in general it's more convenient to not mix whitespace/formatting/layout changes with functional changes in the same commit. |
Look at the time stamps on the comments (not sure why they are ordered the way they are). I posted my response before i saw anything from @jontje. Anyways I went ahead and tried this before seeing the confirmation and it worked perfectly on hardware. As for the whitespace changes, I'll take a look at it. |
Not sure what happened there with your comment, but good to hear you got it to work. |
Couldn't easily rebase the whitespace changes. So I redid the work in a new branch. PR incoming. |
This is a first start at addressing the enhancement originally identified in #34. I am the furthest thing from a RAPID expert that you could possibly find, but I scoured their technical manual and think I have the right API calls to populate the various fields in the robot status message.
Besides better ways I could be doing things, the one known issue I have currently is how to best populate the
in_motion
flag. My first idea was to just grab the state of theROS_new_trajectory
boolean. While this better represents a "motion eminent" state rather than strictly "in motion", I thought it would be a good approximation. However when I tested this logic on hardware, the robot refused to execute any commanded trajectory. My guess is there is maybe a race condition in some trajectory monitoring logic somewhere. If it is a race, it would be compounded by other issues we are currently having (#142). That is the best I can come up with...How do other industrial robots handle
in_motion
? Are they more sensor driven? For instance looking at joint velocities or estimating joint velocities? In my cursory search through the ABB literature, I couldn't find pre-made signal to easily populate this field.Other than help on this specific field, I know I will need to make a PR to update the tutorial wiki (http://wiki.ros.org/abb/Tutorials/InstallServer) as this solution does require setting up some signals in RobotStudio's System Configuration.