Skip to content

Commit 667d462

Browse files
authored
Merge pull request #379 from rop-ctu/fix/moveit-example-rolling
Fix moveit servo example
2 parents 99dc94a + 67c94b3 commit 667d462

3 files changed

Lines changed: 13 additions & 12 deletions

File tree

lbr_bringup/lbr_bringup/moveit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def node_moveit_servo(
141141
) -> Node:
142142
return Node(
143143
package="moveit_servo",
144-
executable="servo_node_main",
144+
executable="servo_node",
145145
output="screen",
146146
namespace=robot_name,
147147
**kwargs,

lbr_demos/lbr_moveit/lbr_moveit/forward_keyboard_node.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from dataclasses import dataclass
1+
from dataclasses import dataclass, field
22

33
import numpy as np
44
import rclpy
@@ -25,8 +25,8 @@ class Rotation:
2525
z: float = 0.0
2626

2727
joints: list
28-
translation: Translation = Translation()
29-
rotation: Rotation = Rotation()
28+
translation: Translation = field(default_factory=Translation)
29+
rotation: Rotation = field(default_factory=Rotation)
3030

3131
@dataclass
3232
class KeyboardLayout:
@@ -47,9 +47,9 @@ class Z:
4747
increase: str = "q"
4848
decrease: str = "e"
4949

50-
x: X = X()
51-
y: Y = Y()
52-
z: Z = Z()
50+
x: X = field(default_factory=X)
51+
y: Y = field(default_factory=Y)
52+
z: Z = field(default_factory=Z)
5353

5454
@dataclass
5555
class Rotation:
@@ -68,13 +68,13 @@ class Z:
6868
increase: str = "y"
6969
decrease: str = "h"
7070

71-
x: X = X()
72-
y: Y = Y()
73-
z: Z = Z()
71+
x: X = field(default_factory=X)
72+
y: Y = field(default_factory=Y)
73+
z: Z = field(default_factory=Z)
7474

7575
joints: list
76-
translation: Translation = Translation()
77-
rotation: Rotation = Rotation()
76+
translation: Translation = field(default_factory=Translation)
77+
rotation: Rotation = field(default_factory=Rotation)
7878
escape: str = "Key.esc"
7979
pause: str = "p"
8080
reverse_joints: str = "r"

lbr_demos/lbr_moveit/package.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<test_depend>ament_flake8</test_depend>
1212
<test_depend>ament_pep257</test_depend>
1313
<test_depend>python3-pytest</test_depend>
14+
<exec_depend>python3-pynput</exec_depend>
1415

1516
<export>
1617
<build_type>ament_python</build_type>

0 commit comments

Comments
 (0)