Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
universal_robot
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hsh
universal_robot
Commits
292371f7
Commit
292371f7
authored
5 years ago
by
cclauss
Browse files
Options
Downloads
Patches
Plain Diff
Old style exceptions --> new stye for Python 3
parent
bbaff880
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
ur_driver/src/ur_driver/driver.py
+3
-3
3 additions, 3 deletions
ur_driver/src/ur_driver/driver.py
ur_driver/src/ur_driver/io_interface.py
+4
-4
4 additions, 4 deletions
ur_driver/src/ur_driver/io_interface.py
with
7 additions
and
7 deletions
ur_driver/src/ur_driver/driver.py
+
3
−
3
View file @
292371f7
...
...
@@ -459,7 +459,7 @@ class CommanderTCPHandler(SocketServer.BaseRequestHandler):
if
not
buf
:
buf
=
buf
+
self
.
recv_more
()
except
EOF
,
ex
:
except
EOF
as
ex
:
print
(
"
Connection closed (command):
"
,
ex
)
setConnectedRobot
(
None
)
...
...
@@ -964,7 +964,7 @@ def main():
prevent_programming
=
rospy
.
get_param
(
"
~prevent_programming
"
)
update
=
{
'
prevent_programming
'
:
prevent_programming
}
reconfigure_srv
.
update_configuration
(
update
)
except
KeyError
,
ex
:
except
KeyError
as
ex
:
print
(
"
Parameter
'
prevent_programming
'
not set. Value:
"
+
str
(
prevent_programming
))
pass
if
prevent_programming
:
...
...
@@ -985,7 +985,7 @@ def main():
prevent_programming
=
rospy
.
get_param
(
"
~prevent_programming
"
)
update
=
{
'
prevent_programming
'
:
prevent_programming
}
reconfigure_srv
.
update_configuration
(
update
)
except
KeyError
,
ex
:
except
KeyError
as
ex
:
print
(
"
Parameter
'
prevent_programming
'
not set. Value:
"
+
str
(
prevent_programming
))
pass
connection
.
send_program
()
...
...
This diff is collapsed.
Click to expand it.
ur_driver/src/ur_driver/io_interface.py
+
4
−
4
View file @
292371f7
...
...
@@ -21,25 +21,25 @@ ANALOG_TOLERANCE_VALUE = 0.01
def
set_io_val
(
fun
,
pin
,
val
):
try
:
set_io
(
fun
,
pin
,
val
)
except
rospy
.
ServiceException
,
e
:
except
rospy
.
ServiceException
as
e
:
print
"
Service call failed: %s
"
%
e
def
set_tool_voltage
(
volts
):
try
:
set_io
(
FUN_SET_TOOL_VOLTAGE
,
volts
,
0
)
except
rospy
.
ServiceException
,
e
:
except
rospy
.
ServiceException
as
e
:
print
"
Service call failed: %s
"
%
e
def
set_digital_out
(
pin
,
val
):
try
:
set_io
(
FUN_SET_DIGITAL_OUT
,
pin
,
val
)
except
rospy
.
ServiceException
,
e
:
except
rospy
.
ServiceException
as
e
:
print
"
Service call failed: %s
"
%
e
def
set_analog_out
(
pin
,
val
):
try
:
set_io
(
FUN_SET_ANALOG_OUT
,
pin
,
val
)
except
rospy
.
ServiceException
,
e
:
except
rospy
.
ServiceException
as
e
:
print
"
Service call failed: %s
"
%
e
def
set_flag
(
pin
,
val
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment