diff --git a/lbr_bringup/launch/gazebo.launch.py b/lbr_bringup/launch/gazebo.launch.py
index 0ff93e5b..bc1ff586 100644
--- a/lbr_bringup/launch/gazebo.launch.py
+++ b/lbr_bringup/launch/gazebo.launch.py
@@ -38,10 +38,10 @@ def generate_launch_description() -> LaunchDescription:
# Gazebo
ld.add_action(GazeboMixin.include_gazebo()) # Gazebo has its own controller manager
- spawn_entity = GazeboMixin.node_spawn_entity(
- tf=world_robot_tf
+ ld.add_action(GazeboMixin.node_clock_bridge())
+ ld.add_action(
+ GazeboMixin.node_create(tf=world_robot_tf)
) # spawns robot in Gazebo through robot_description topic of robot_state_publisher
- ld.add_action(spawn_entity)
# controllers
joint_state_broadcaster = LBRROS2ControlMixin.node_controller_spawner(
diff --git a/lbr_bringup/launch/move_group.launch.py b/lbr_bringup/launch/move_group.launch.py
index 3d1f0bdd..8a966915 100644
--- a/lbr_bringup/launch/move_group.launch.py
+++ b/lbr_bringup/launch/move_group.launch.py
@@ -75,6 +75,10 @@ def hidden_setup(context: LaunchContext) -> List[LaunchDescriptionEntity]:
"robot_description_semantic",
PathJoinSubstitution([robot_name, "robot_description_semantic"]),
),
+ (
+ "recognized_object_array",
+ PathJoinSubstitution([robot_name, "recognized_object_array"]),
+ ),
],
condition=IfCondition(LaunchConfiguration("rviz")),
)
diff --git a/lbr_bringup/lbr_bringup/gazebo.py b/lbr_bringup/lbr_bringup/gazebo.py
index 145e052d..07e74c6c 100644
--- a/lbr_bringup/lbr_bringup/gazebo.py
+++ b/lbr_bringup/lbr_bringup/gazebo.py
@@ -14,17 +14,18 @@ def include_gazebo(**kwargs) -> IncludeLaunchDescription:
PythonLaunchDescriptionSource(
PathJoinSubstitution(
[
- FindPackageShare("gazebo_ros"),
+ FindPackageShare("ros_gz_sim"),
"launch",
- "gazebo.launch.py",
+ "gz_sim.launch.py",
]
- )
+ ),
),
+ launch_arguments={"gz_args": "-r empty.sdf"}.items(),
**kwargs,
)
@staticmethod
- def node_spawn_entity(
+ def node_create(
robot_name: Optional[Union[LaunchConfiguration, str]] = LaunchConfiguration(
"robot_name", default="lbr"
),
@@ -34,16 +35,27 @@ def node_spawn_entity(
label = ["-x", "-y", "-z", "-R", "-P", "-Y"]
tf = [str(x) for x in tf]
return Node(
- package="gazebo_ros",
- executable="spawn_entity.py",
+ package="ros_gz_sim",
+ executable="create",
arguments=[
"-topic",
"robot_description",
- "-entity",
+ "-name",
robot_name,
+ "-allow_renaming",
]
+ [item for pair in zip(label, tf) for item in pair],
output="screen",
namespace=robot_name,
**kwargs,
)
+
+ @staticmethod
+ def node_clock_bridge(**kwargs) -> Node:
+ return Node(
+ package="ros_gz_bridge",
+ executable="parameter_bridge",
+ arguments=["/clock@rosgraph_msgs/msg/Clock[gz.msgs.Clock"],
+ output="screen",
+ **kwargs,
+ )
diff --git a/lbr_bringup/package.xml b/lbr_bringup/package.xml
index eb6bc33e..b89b0ea8 100644
--- a/lbr_bringup/package.xml
+++ b/lbr_bringup/package.xml
@@ -20,6 +20,7 @@
rclpy
robot_state_publisher
ros_gz_sim
+ ros_gz_bridge
rviz2
xacro
diff --git a/lbr_description/gazebo/lbr_gazebo.xacro b/lbr_description/gazebo/lbr_gazebo.xacro
index 12270f9e..a828c0d5 100644
--- a/lbr_description/gazebo/lbr_gazebo.xacro
+++ b/lbr_description/gazebo/lbr_gazebo.xacro
@@ -9,8 +9,6 @@
$(find lbr_ros2_control)/config/lbr_controllers.yaml
/${robot_name}
-
- ~/robot_description:=robot_description
diff --git a/lbr_description/lbr_description.dsv b/lbr_description/lbr_description.dsv
index a00fa973..84de9292 100644
--- a/lbr_description/lbr_description.dsv
+++ b/lbr_description/lbr_description.dsv
@@ -1 +1 @@
-prepend-non-duplicate;IGN_GAZEBO_RESOURCE_PATH;share
\ No newline at end of file
+prepend-non-duplicate;GZ_SIM_RESOURCE_PATH;share
\ No newline at end of file
diff --git a/lbr_ros2_control/config/lbr_system_interface.xacro b/lbr_ros2_control/config/lbr_system_interface.xacro
index 051eda61..23738b9a 100644
--- a/lbr_ros2_control/config/lbr_system_interface.xacro
+++ b/lbr_ros2_control/config/lbr_system_interface.xacro
@@ -100,7 +100,7 @@
-
+
-${max_torque}
${max_torque}