From 466acb0692d43f4e420a376865a53218bcafeab3 Mon Sep 17 00:00:00 2001 From: Mehdi <60067141+mehhdiii@users.noreply.github.com> Date: Tue, 18 Jun 2024 10:10:59 +0200 Subject: [PATCH] fix: pass message instance to send goal in action client (#163) --- jupyros/ros1/ros_widgets.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/jupyros/ros1/ros_widgets.py b/jupyros/ros1/ros_widgets.py index e1f9942..cbd2290 100644 --- a/jupyros/ros1/ros_widgets.py +++ b/jupyros/ros1/ros_widgets.py @@ -415,8 +415,9 @@ def action_client(action_name, action_msg, goal_msg, callbacks=None): thread_map[action_name] = False def send_goal(arg): - widget_dict_to_msg(goal_msg, widget_dict) - a_client.send_goal(goal_msg, + goal_msg_instance = goal_msg() + widget_dict_to_msg(goal_msg_instance, widget_dict) + a_client.send_goal(goal_msg_instance, done_cb=done_handle, active_cb=active_handle, feedback_cb=feedback_handle