From 459cbbc2ea87f716c776cae851bf1c3106f17b5d Mon Sep 17 00:00:00 2001 From: TomasMerva Date: Mon, 24 Jun 2024 14:16:59 +0200 Subject: [PATCH 1/2] modified dingo and kinova launch files for multiagent --- dinova_bringup/config/vicon_dingo1.yaml | 36 ++++- dinova_bringup/config/vicon_dingo2.yaml | 35 ++++- dinova_bringup/launch/dingo.launch | 134 ++++++++++-------- dinova_bringup/launch/dinova.launch | 35 ++--- dinova_bringup/launch/kinova.launch | 43 +++--- dinova_bringup/scripts/battery_checker | 2 +- .../scripts/dingo_state_publisher.py | 10 +- 7 files changed, 189 insertions(+), 106 deletions(-) diff --git a/dinova_bringup/config/vicon_dingo1.yaml b/dinova_bringup/config/vicon_dingo1.yaml index 42a5b3f..abd2e99 100644 --- a/dinova_bringup/config/vicon_dingo1.yaml +++ b/dinova_bringup/config/vicon_dingo1.yaml @@ -1,11 +1,45 @@ object_names: - "dingo1" + - "dingo2" + - "tablesmall_1" + - "tablesmall_2" + - "cup1" + - "cup2" + - "wineglass" + - "dynamic_object2" object_msg_types: # "geometry_msgs/{PoseStamped,TransformStamped,PoseWithCovarianceStamped}" - "geometry_msgs/PoseStamped" + - "geometry_msgs/PoseStamped" + - "geometry_msgs/PoseStamped" + - "geometry_msgs/PoseStamped" + - "geometry_msgs/PoseStamped" + - "geometry_msgs/PoseStamped" + - "geometry_msgs/PoseStamped" + - "geometry_msgs/PoseStamped" object_frame_ids: - "map" + - "map" + - "map" + - "map" + - "map" + - "map" + - "map" + - "map" object_frequency_divider: - 2 + - 2 + - 2 + - 2 + - 2 + - 2 + - 2 + - 2 object_publish_topics: - "/vicon/dingo1" - + - "/vicon/dingo2" + - "/vicon/tablesmall_1" + - "/vicon/tablesmall_2" + - "/vicon/cup1" + - "/vicon/cup2" + - "/vicon/wineglass" + - "/vicon/dynamic_object2" \ No newline at end of file diff --git a/dinova_bringup/config/vicon_dingo2.yaml b/dinova_bringup/config/vicon_dingo2.yaml index 137cf3d..431d217 100644 --- a/dinova_bringup/config/vicon_dingo2.yaml +++ b/dinova_bringup/config/vicon_dingo2.yaml @@ -1,16 +1,45 @@ object_names: + - "dingo1" - "dingo2" - - "mug1" + - "tablesmall_1" + - "tablesmall_2" + - "cup1" + - "cup2" + - "wineglass" + - "dynamic_object2" object_msg_types: # "geometry_msgs/{PoseStamped,TransformStamped,PoseWithCovarianceStamped}" - "geometry_msgs/PoseStamped" - "geometry_msgs/PoseStamped" + - "geometry_msgs/PoseStamped" + - "geometry_msgs/PoseStamped" + - "geometry_msgs/PoseStamped" + - "geometry_msgs/PoseStamped" + - "geometry_msgs/PoseStamped" + - "geometry_msgs/PoseStamped" object_frame_ids: - "map" - "map" + - "map" + - "map" + - "map" + - "map" + - "map" + - "map" object_frequency_divider: - 2 - 2 + - 2 + - 2 + - 2 + - 2 + - 2 + - 2 object_publish_topics: + - "/vicon/dingo1" - "/vicon/dingo2" - - "/vicon/mug1" - + - "/vicon/tablesmall_1" + - "/vicon/tablesmall_2" + - "/vicon/cup1" + - "/vicon/cup2" + - "/vicon/wineglass" + - "/vicon/dynamic_object2" diff --git a/dinova_bringup/launch/dingo.launch b/dinova_bringup/launch/dingo.launch index 98c521b..36e38a0 100644 --- a/dinova_bringup/launch/dingo.launch +++ b/dinova_bringup/launch/dingo.launch @@ -3,80 +3,92 @@ + - - - - - - - + + + + + - - - - - - - - - - - - - - - - gain: 0.1 - zeta: 0.001 - publish_tf: false - use_magnetic_field_msg: true - - + + + - - + - - + - - - - - + + + + + + - - - - - - - - - + + + + gain: 0.1 + zeta: 0.001 + publish_tf: false + use_magnetic_field_msg: true + + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - diff --git a/dinova_bringup/launch/dinova.launch b/dinova_bringup/launch/dinova.launch index 6a74a7c..aab4f13 100644 --- a/dinova_bringup/launch/dinova.launch +++ b/dinova_bringup/launch/dinova.launch @@ -8,7 +8,7 @@ For Gazebo set it to false --> - + @@ -27,7 +27,7 @@ lidar:=$(arg lidar)"/> - + @@ -45,10 +45,10 @@ - gain: 0.1 - zeta: 0.001 - publish_tf: false - use_magnetic_field_msg: true + gain: 0.1 + zeta: 0.001 + publish_tf: false + use_magnetic_field_msg: true @@ -61,20 +61,20 @@ - - - - - + + + + + - - - - - + + + + + @@ -82,6 +82,9 @@ + + + diff --git a/dinova_bringup/launch/kinova.launch b/dinova_bringup/launch/kinova.launch index 605c1a7..1d6dc09 100644 --- a/dinova_bringup/launch/kinova.launch +++ b/dinova_bringup/launch/kinova.launch @@ -1,30 +1,35 @@ + + + + + + - - - - - + + + + + + - - + + - - - - - + + - - + + + + + + + - - + diff --git a/dinova_bringup/scripts/battery_checker b/dinova_bringup/scripts/battery_checker index 762ebc8..6f84a43 100755 --- a/dinova_bringup/scripts/battery_checker +++ b/dinova_bringup/scripts/battery_checker @@ -76,7 +76,7 @@ class BatteryChecker(): def establish_ros_connections(self): rospy.Subscriber("battery/status", BatteryState, self._battery_state_callback) - self._light_pub = rospy.Publisher("/cmd_lights", Lights, queue_size=1) + self._light_pub = rospy.Publisher("cmd_lights", Lights, queue_size=1) def _battery_state_callback(self, data: BatteryState): self._percentage = data.percentage diff --git a/dinova_control/scripts/dingo_state_publisher.py b/dinova_control/scripts/dingo_state_publisher.py index c71f44d..bc26cb8 100644 --- a/dinova_control/scripts/dingo_state_publisher.py +++ b/dinova_control/scripts/dingo_state_publisher.py @@ -12,14 +12,14 @@ class DingoStatePublisher(): def __init__(self) -> None: - self.pub_dinova_omni_state = rospy.Publisher('/dingo/omni_states', JointState, queue_size=1) #TODO + self.pub_dinova_omni_state = rospy.Publisher('dingo/omni_states', JointState, queue_size=1) #TODO - if rospy.get_param("/vicon/use_vicon"): - self.pub_dinova_omni_state_vicon = rospy.Publisher('/dingo/omni_states_vicon', JointState, queue_size=1) #TODO - rospy.Subscriber(rospy.get_param("/vicon/dingo_topic"), PoseStamped, self.callback_vicon) + if rospy.get_param("vicon/use_vicon"): + self.pub_dinova_omni_state_vicon = rospy.Publisher('dingo/omni_states_vicon', JointState, queue_size=1) #TODO + rospy.Subscriber(rospy.get_param("vicon/dingo_topic"), PoseStamped, self.callback_vicon) - rospy.Subscriber("/odometry/filtered", Odometry, self.callback_odometry) + rospy.Subscriber("odometry/filtered", Odometry, self.callback_odometry) self.n_dofs_dingo_wheels = 4 self.n_dofs_dingo_omni = 3 From b5d57d9f0183c5ed972cf643886f612fff92ae93 Mon Sep 17 00:00:00 2001 From: TomasMerva Date: Mon, 24 Jun 2024 14:28:23 +0200 Subject: [PATCH 2/2] corrected frame --- dinova_bringup/launch/dingo.launch | 2 +- dinova_bringup/launch/dinova.launch | 2 +- dinova_bringup/launch/kinova.launch | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dinova_bringup/launch/dingo.launch b/dinova_bringup/launch/dingo.launch index 36e38a0..63ae85f 100644 --- a/dinova_bringup/launch/dingo.launch +++ b/dinova_bringup/launch/dingo.launch @@ -78,7 +78,7 @@ - + diff --git a/dinova_bringup/launch/dinova.launch b/dinova_bringup/launch/dinova.launch index aab4f13..fe39254 100644 --- a/dinova_bringup/launch/dinova.launch +++ b/dinova_bringup/launch/dinova.launch @@ -90,7 +90,7 @@ - + diff --git a/dinova_bringup/launch/kinova.launch b/dinova_bringup/launch/kinova.launch index 1d6dc09..35dd4ec 100644 --- a/dinova_bringup/launch/kinova.launch +++ b/dinova_bringup/launch/kinova.launch @@ -27,7 +27,7 @@ - +