From cc074f4c0a5329ecc5f37ffeb4021e3162e4854d Mon Sep 17 00:00:00 2001 From: Niko Date: Tue, 5 Sep 2023 13:35:50 +0200 Subject: [PATCH] moveit_interface.cpp update --- franka_iml_experiment/dmp_node.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/franka_iml_experiment/dmp_node.py b/franka_iml_experiment/dmp_node.py index ea2f1c0..55cc825 100644 --- a/franka_iml_experiment/dmp_node.py +++ b/franka_iml_experiment/dmp_node.py @@ -26,7 +26,7 @@ class DMPNode(Node): self.traj_publisher = self.create_publisher(PoseArray, 'moveit_interface/task_space_trajectory', 10) def dmp_callback(self, msg): - start = msg.start + start = msg.start_point self.get_logger().info(f"{start}") end = np.array(msg.end_point) time = msg.time @@ -35,7 +35,7 @@ class DMPNode(Node): # weights = np.vstack((msg.p_x, msg.p_y, msg.p_z, msg.o_x, msg.o_y, msg.o_z, msg.o_w)) weights = np.vstack((msg.p_x, msg.p_y)) - dmp = pydmps.dmp_discrete.DMPs_discrete(n_dmps=2, n_bfs=nr_bfs, w=weights, y0=start, goal=end) + dmp = pydmps.dmp_discrete.DMPs_discrete(n_dmps=2, n_bfs=nr_bfs, w=weights, y0=start[:2], goal=end[:2]) y_track, _, _ = dmp.rollout(tau=time) pose_msg = PoseArray()