14 from jog_msgs.msg
import JogFrame
15 from sensor_msgs.msg
import Joy
22 self.
axis_linear = rospy.get_param(
'~axis_linear', {
'x': 0,
'y': 1,
'z': 4})
23 self.
axis_angular = rospy.get_param(
'~axis_angular', {
'x': 0,
'y': 1,
'z': 4})
24 self.
scale_linear = rospy.get_param(
'~scale_linear', {
'x': 0.05,
'y': 0.05,
'z': 0.05})
25 self.
scale_angular = rospy.get_param(
'~scales_angular', {
'x': 0.05,
'y': 0.05,
'z': 0.05})
27 self.
pub = rospy.Publisher(
'jog_frame', JogFrame, queue_size=1)
37 msg.header.stamp = rospy.Time.now()
38 msg.header.frame_id = rospy.get_param(
'~frame_id',
'base_link')
39 msg.group_name = rospy.get_param(
'~group_name',
'manipulator')
40 msg.link_name = rospy.get_param(
'~link_name',
'tool0')
52 msg.avoid_collisions =
True 56 rospy.Subscriber(rospy.get_param(
'~sub_topic',
'joy'), Joy, self.
callback)
60 if __name__ ==
'__main__':
61 rospy.init_node(
'joy_to_jog_frame', anonymous=
True)
63 republisher.republish()