Read cartesian controller topic from rosparam

This commit is contained in:
Michel Breyer
2021-11-24 11:34:12 +01:00
parent 2e1f3eb4a7
commit bcd270414f
4 changed files with 9 additions and 3 deletions

View File

@@ -156,7 +156,8 @@ class CartesianVelocityControllerPlugin(Plugin):
super().__init__(rate)
self.arm = arm
self.model = model
rospy.Subscriber("command", Twist, self.target_cb)
topic = rospy.get_param("cartesian_velocity_controller/topic")
rospy.Subscriber(topic, Twist, self.target_cb)
def target_cb(self, msg):
self.dx_d = from_twist_msg(msg)