Skip to content

Commit 7a97d3f

Browse files
committed
Remove the UR namespace, use relative path to the rosparam, init the node with ~
1 parent 45a1ebb commit 7a97d3f

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

robotiq_3f_gripper_control/launch/s_model.launch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<launch>
44
<arg name="ip_address" default="192.168.131.41" />
55

6-
<node name="s_model" pkg="robotiq_3f_gripper_control" type="SModelTcpNode.py" ns="UR_1" respawn="true" output="screen">
7-
<param name="s_model_ip" value="$(arg ip_address)" />
8-
</node>
6+
<node name="s_model" pkg="robotiq_3f_gripper_control" type="SModelTcpNode.py" respawn="true" output="screen">
7+
<param name="ip_address" value="$(arg ip_address)" />
8+
</node>
99

1010
</launch>

robotiq_3f_gripper_control/nodes/SModelTcpNode.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,10 @@
5151
from robotiq_3f_gripper_msgs.msg import SModelRobotOutput as outputMsg
5252

5353
def mainLoop():
54+
rospy.init_node('~')
5455

5556
print "Launching S-Model Gripper Control"
56-
address = rospy.get_param('/s_model_ip', '192.168.1.19')
57+
address = rospy.get_param('~ip_address', '192.168.1.19')
5758

5859
#Gripper is a S-Model with a TCP connection
5960
gripper = robotiq_3f_gripper_control.baseSModel.robotiqBaseSModel()
@@ -62,8 +63,6 @@ def mainLoop():
6263
#We connect to the address received as an argument
6364
gripper.client.connectToDevice(address)
6465

65-
rospy.init_node('robotiqSModel')
66-
6766
#The Gripper status is published on the topic named 'SModelRobotInput'
6867
pub = rospy.Publisher('SModelRobotInput', inputMsg, queue_size=1)
6968

0 commit comments

Comments
 (0)