Skip to content

Commit

Permalink
Merge pull request #117 from lbr-stack/dev-humble-ignition-gazebo
Browse files Browse the repository at this point in the history
Humble ignition gazebo
  • Loading branch information
mhubii authored Sep 27, 2024
2 parents 71bf3f8 + febbf5c commit 77e9082
Show file tree
Hide file tree
Showing 20 changed files with 69 additions and 42 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Changelog for package LBR FRI ROS 2 Stack
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Humble v2.1.1 (2024-09-27)
--------------------------
* Adds support for the new Gazebo and removes support for Gazebo Classic (End-of-Life January 2025, refer https://community.gazebosim.org/t/gazebo-classic-end-of-life/2563).
* ``lbr_bringup``: Updated launch files and dependencies.
* ``lbr_description``: Updated ``<gazebo>`` tag to include Gazebo plugin (see https://github.com/ros-controls/gz_ros2_control/tree/humble).
* ``lbr_ros2_control``: Changed ``gazebo_ros2_control/GazeboSystem`` -> ``ign_ros2_control/IgnitionSystem```

Humble v2.1.0 (2024-09-10)
--------------------------
* De-couple launch files from ``lbr_bringup`` for easier customization (breaking change):
Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ authors:


title: "LBR-Stack: ROS 2 and Python Integration of KUKA FRI for Med and IIWA Robots"
version: 2.1.0
version: 2.1.1
doi: 10.48550/arXiv.2311.12709
date-released: 2024-09-10
date-released: 2024-09-27
6 changes: 3 additions & 3 deletions lbr_bringup/launch/gazebo.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
4 changes: 4 additions & 0 deletions lbr_bringup/launch/move_group.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")),
)
Expand Down
26 changes: 19 additions & 7 deletions lbr_bringup/lbr_bringup/gazebo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
),
Expand All @@ -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,
)
17 changes: 9 additions & 8 deletions lbr_bringup/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,27 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>lbr_bringup</name>
<version>2.1.0</version>
<version>2.1.1</version>
<description>LBR launch files.</description>
<maintainer email="[email protected]">mhubii</maintainer>
<license>Apache License 2.0</license>

<buildtool_depend>ament_cmake</buildtool_depend>
<buildtool_depend>ament_cmake_python</buildtool_depend>

<exec_depend>lbr_description</exec_depend>
<exec_depend>lbr_fri_ros2</exec_depend>
<exec_depend>lbr_ros2_control</exec_depend>
<exec_depend>controller_manager</exec_depend>
<exec_depend>ign_ros2_control</exec_depend>
<exec_depend>joint_state_broadcaster</exec_depend>
<exec_depend>joint_trajectory_controller</exec_depend>
<exec_depend>xacro</exec_depend>
<exec_depend>lbr_description</exec_depend>
<exec_depend>lbr_fri_ros2</exec_depend>
<exec_depend>lbr_ros2_control</exec_depend>
<exec_depend>rclpy</exec_depend>
<exec_depend>robot_state_publisher</exec_depend>
<exec_depend>gazebo_ros</exec_depend>
<exec_depend>gazebo_ros2_control</exec_depend>
<exec_depend>ros_gz_sim</exec_depend>
<exec_depend>ros_gz_bridge</exec_depend>
<exec_depend>rviz2</exec_depend>
<exec_depend>rclpy</exec_depend>
<exec_depend>xacro</exec_depend>

<export>
<build_type>ament_cmake</build_type>
Expand Down
2 changes: 1 addition & 1 deletion lbr_demos/lbr_demos_advanced_cpp/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>lbr_demos_advanced_cpp</name>
<version>2.1.0</version>
<version>2.1.1</version>
<description>Advanced C++ demos for the lbr_ros2_control.</description>
<maintainer email="[email protected]">mhubii</maintainer>
<license>Apache License 2.0</license>
Expand Down
2 changes: 1 addition & 1 deletion lbr_demos/lbr_demos_advanced_py/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>lbr_demos_advanced_py</name>
<version>2.1.0</version>
<version>2.1.1</version>
<description>Advanced Python demos for the lbr_ros2_control.</description>
<maintainer email="[email protected]">mhubii</maintainer>
<maintainer email="[email protected]">cmower</maintainer>
Expand Down
2 changes: 1 addition & 1 deletion lbr_demos/lbr_demos_advanced_py/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

setup(
name=package_name,
version="2.1.0",
version="2.1.1",
packages=[package_name],
data_files=[
("share/ament_index/resource_index/packages", ["resource/" + package_name]),
Expand Down
2 changes: 1 addition & 1 deletion lbr_demos/lbr_demos_cpp/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>lbr_demos_cpp</name>
<version>2.1.0</version>
<version>2.1.1</version>
<description>C++ demos for lbr_ros2_control.</description>
<maintainer email="[email protected]">mhubii</maintainer>
<license>Apache License 2.0</license>
Expand Down
2 changes: 1 addition & 1 deletion lbr_demos/lbr_demos_py/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>lbr_demos_py</name>
<version>2.1.0</version>
<version>2.1.1</version>
<description>Python demos for lbr_ros2_control.</description>
<maintainer email="[email protected]">mhubii</maintainer>
<license>Apache License 2.0</license>
Expand Down
2 changes: 1 addition & 1 deletion lbr_demos/lbr_demos_py/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

setup(
name=package_name,
version="2.1.0",
version="2.1.1",
packages=[package_name],
data_files=[
("share/ament_index/resource_index/packages", ["resource/" + package_name]),
Expand Down
2 changes: 1 addition & 1 deletion lbr_demos/lbr_moveit_cpp/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>lbr_moveit_cpp</name>
<version>2.1.0</version>
<version>2.1.1</version>
<description>Demo for using MoveIt C++ API.</description>
<maintainer email="[email protected]">mhubii</maintainer>
<license>Apache-2.0</license>
Expand Down
5 changes: 2 additions & 3 deletions lbr_description/gazebo/lbr_gazebo.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@

<!-- ros_control-plugin -->
<gazebo>
<plugin name="gazebo_ros2_control" filename="libgazebo_ros2_control.so">
<plugin name="ign_ros2_control::IgnitionROS2ControlPlugin"
filename="ign_ros2_control-system">
<parameters>$(find lbr_ros2_control)/config/lbr_controllers.yaml</parameters>
<ros>
<namespace>/${robot_name}</namespace>
<!-- remapping for controller manager inside Gazebo plugin -->
<remapping>~/robot_description:=robot_description</remapping>
</ros>
</plugin>
</gazebo>
Expand Down
2 changes: 1 addition & 1 deletion lbr_description/lbr_description.dsv
Original file line number Diff line number Diff line change
@@ -1 +1 @@
prepend-non-duplicate;GAZEBO_MODEL_PATH;share
prepend-non-duplicate;GZ_SIM_RESOURCE_PATH;share
6 changes: 3 additions & 3 deletions lbr_description/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>lbr_description</name>
<version>2.1.0</version>
<version>2.1.1</version>
<description>KUKA LBR description files</description>
<maintainer email="[email protected]">mhubii</maintainer>
<license>Apache License 2.0</license>

<buildtool_depend>ament_cmake</buildtool_depend>
<buildtool_depend>ament_cmake_pytest</buildtool_depend>

<exec_depend>gazebo_ros2_control</exec_depend>
<exec_depend>ign_ros2_control</exec_depend>
<exec_depend>joint_state_publisher_gui</exec_depend>
<exec_depend>tf2_ros</exec_depend>
<exec_depend>robot_state_publisher</exec_depend>
<exec_depend>rviz2</exec_depend>
<exec_depend>tf2_ros</exec_depend>
<exec_depend>xacro</exec_depend>

<test_depend>python3-pytest</test_depend>
Expand Down
2 changes: 1 addition & 1 deletion lbr_fri_ros2/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>lbr_fri_ros2</name>
<version>2.1.0</version>
<version>2.1.1</version>
<description>The lbr_fri_ros2 package provides the Fast Robot Interface (FRI) integration into ROS
2. Robot states can be extracted and commanded.</description>
<maintainer email="[email protected]">mhubii</maintainer>
Expand Down
2 changes: 1 addition & 1 deletion lbr_fri_ros2_stack/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>lbr_fri_ros2_stack</name>
<version>2.1.0</version>
<version>2.1.1</version>
<description>ROS 2 stack for KUKA LBRs.</description>
<maintainer email="[email protected]">mhubii</maintainer>
<license>Apache License 2.0</license>
Expand Down
14 changes: 9 additions & 5 deletions lbr_ros2_control/config/lbr_system_interface.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</xacro:if>
<xacro:if value="${mode == 'gazebo'}">
<hardware>
<plugin>gazebo_ros2_control/GazeboSystem</plugin>
<plugin>ign_ros2_control/IgnitionSystem</plugin>
</hardware>
</xacro:if>
<xacro:if value="${mode == 'hardware'}">
Expand Down Expand Up @@ -98,10 +98,14 @@
<param name="min">${min_position}</param>
<param name="max">${max_position}</param>
</command_interface>
<command_interface name="effort">
<param name="min">-${max_torque}</param>
<param name="max"> ${max_torque}</param>
</command_interface>
<!-- only single command interface, refer
https://github.com/ros-controls/gz_ros2_control/issues/182 -->
<xacro:unless value="${mode == 'gazebo'}">
<command_interface name="effort">
<param name="min">-${max_torque}</param>
<param name="max"> ${max_torque}</param>
</command_interface>
</xacro:unless>
<state_interface name="position" />
<state_interface name="velocity" />
<state_interface name="effort" />
Expand Down
2 changes: 1 addition & 1 deletion lbr_ros2_control/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>lbr_ros2_control</name>
<version>2.1.0</version>
<version>2.1.1</version>
<description>ROS 2 hardware hardware_interface for KUKA LBR through Fast Robot Interface (FRI).</description>
<maintainer email="[email protected]">mhubii</maintainer>
<license>Apache License 2.0</license>
Expand Down

0 comments on commit 77e9082

Please sign in to comment.