Skip to content
Snippets Groups Projects
Commit 55edc60e authored by Eitan Marder-Eppstein's avatar Eitan Marder-Eppstein
Browse files

Modifying the driver so that it can work when run from a different directory...

Modifying the driver so that it can work when run from a different directory than the containing package
parent cd4b0ff8
Branches
Tags
No related merge requests found
......@@ -5,11 +5,11 @@
<node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher" />
<!-- driver -->
<node name="ur5_driver" pkg="ur5_driver" type="driver.py" />
<node name="ur5_driver" pkg="ur5_driver" type="driver.py" args="ur5" output="screen" />
<!-- TF Buffer Server -->
<node pkg="tf2_ros" type="buffer_server" name="tf2_buffer_server" output="screen">
<param name="buffer_size" value="120.0"/>
</node>
</launch>
\ No newline at end of file
</launch>
......@@ -523,7 +523,7 @@ def main():
thread_commander.daemon = True
thread_commander.start()
with open('prog') as fin:
with open(roslib.packages.get_pkg_dir('ur5_driver') + '/prog') as fin:
program = fin.read() % {"driver_hostname": socket.getfqdn()}
connection = UR5Connection(robot_hostname, PORT, program)
connection.connect()
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment