From 0bf822d017c84867fca5697a7d48458dd1e76208 Mon Sep 17 00:00:00 2001 From: Jacob Visser Date: Tue, 5 Sep 2023 13:52:52 +0000 Subject: [PATCH 1/2] Fix build and demos --- .../launch/denso_robot_bringup.launch.py | 2 +- .../cobotta/urdf/denso_robot.ros2_control.xacro | 8 ++++---- .../robots/cobotta/urdf/denso_robot_macro.xacro | 8 ++++---- .../hsr065a1_n32/urdf/denso_robot.ros2_control.xacro | 10 +++++----- .../robots/hsr065a1_n32/urdf/denso_robot_macro.xacro | 12 +++++++----- .../robots/vs060/urdf/denso_robot.ros2_control.xacro | 10 +++++----- .../robots/vs060/urdf/denso_robot_macro.xacro | 12 +++++++----- denso_robot_drivers_ros2.repos | 4 ++-- .../src/denso_robot_moveit_demo.cpp | 2 +- .../src/denso_robot_moveit_pickandplace.cpp | 4 ++-- .../src/denso_robot_moveit_pickandplace_scara.cpp | 4 ++-- 11 files changed, 40 insertions(+), 36 deletions(-) diff --git a/denso_robot_bringup/launch/denso_robot_bringup.launch.py b/denso_robot_bringup/launch/denso_robot_bringup.launch.py index 349a990..da7651f 100644 --- a/denso_robot_bringup/launch/denso_robot_bringup.launch.py +++ b/denso_robot_bringup/launch/denso_robot_bringup.launch.py @@ -376,7 +376,7 @@ def generate_launch_description(): # --------- Gazebo Nodes (only if 'sim:=true') --------- set_param_use_sim_time = SetParameter( name='use_sim_time', value=True, - condition=IfCondition(LaunchConfiguration('sim'))) + condition=IfCondition(sim)) world_file = os.path.join( get_package_share_directory('denso_robot_moveit_config'), 'worlds', 'empty.sdf') diff --git a/denso_robot_descriptions/robots/cobotta/urdf/denso_robot.ros2_control.xacro b/denso_robot_descriptions/robots/cobotta/urdf/denso_robot.ros2_control.xacro index c6d0ae0..a6688f2 100644 --- a/denso_robot_descriptions/robots/cobotta/urdf/denso_robot.ros2_control.xacro +++ b/denso_robot_descriptions/robots/cobotta/urdf/denso_robot.ros2_control.xacro @@ -2,20 +2,20 @@ - - + + ign_ros2_control/IgnitionSystem diff --git a/denso_robot_descriptions/robots/cobotta/urdf/denso_robot_macro.xacro b/denso_robot_descriptions/robots/cobotta/urdf/denso_robot_macro.xacro index bed3ff0..8f46001 100644 --- a/denso_robot_descriptions/robots/cobotta/urdf/denso_robot_macro.xacro +++ b/denso_robot_descriptions/robots/cobotta/urdf/denso_robot_macro.xacro @@ -72,12 +72,12 @@ - + robot_description robot_state_publisher - $(find denso_robot_moveit_config)/robots/$(arg model)/config/denso_robot_controllers.yaml - - + $(find denso_robot_moveit_config)/robots/$(arg model)/config/denso_robot_controllers.yaml + + diff --git a/denso_robot_descriptions/robots/hsr065a1_n32/urdf/denso_robot.ros2_control.xacro b/denso_robot_descriptions/robots/hsr065a1_n32/urdf/denso_robot.ros2_control.xacro index 048763e..041b867 100644 --- a/denso_robot_descriptions/robots/hsr065a1_n32/urdf/denso_robot.ros2_control.xacro +++ b/denso_robot_descriptions/robots/hsr065a1_n32/urdf/denso_robot.ros2_control.xacro @@ -2,23 +2,23 @@ - - + + - gazebo_ros2_control/GazeboSystem + ign_ros2_control/IgnitionSystem denso_robot_control/DensoRobotHW diff --git a/denso_robot_descriptions/robots/hsr065a1_n32/urdf/denso_robot_macro.xacro b/denso_robot_descriptions/robots/hsr065a1_n32/urdf/denso_robot_macro.xacro index 2e286b0..3af289e 100644 --- a/denso_robot_descriptions/robots/hsr065a1_n32/urdf/denso_robot_macro.xacro +++ b/denso_robot_descriptions/robots/hsr065a1_n32/urdf/denso_robot_macro.xacro @@ -44,7 +44,7 @@ - - $(find denso_robot_moveit_config)/robots/$(arg model)/config/denso_robot_controllers.yaml - - + + robot_description + robot_state_publisher + $(find denso_robot_moveit_config)/robots/$(arg model)/config/denso_robot_controllers.yaml + + diff --git a/denso_robot_descriptions/robots/vs060/urdf/denso_robot.ros2_control.xacro b/denso_robot_descriptions/robots/vs060/urdf/denso_robot.ros2_control.xacro index 067c56a..a6688f2 100644 --- a/denso_robot_descriptions/robots/vs060/urdf/denso_robot.ros2_control.xacro +++ b/denso_robot_descriptions/robots/vs060/urdf/denso_robot.ros2_control.xacro @@ -2,23 +2,23 @@ - - + + - gazebo_ros2_control/GazeboSystem + ign_ros2_control/IgnitionSystem denso_robot_control/DensoRobotHW diff --git a/denso_robot_descriptions/robots/vs060/urdf/denso_robot_macro.xacro b/denso_robot_descriptions/robots/vs060/urdf/denso_robot_macro.xacro index b042d68..8c1e526 100644 --- a/denso_robot_descriptions/robots/vs060/urdf/denso_robot_macro.xacro +++ b/denso_robot_descriptions/robots/vs060/urdf/denso_robot_macro.xacro @@ -46,7 +46,7 @@ - - $(find denso_robot_moveit_config)/robots/$(arg model)/config/denso_robot_controllers.yaml - - + + robot_description + robot_state_publisher + $(find denso_robot_moveit_config)/robots/$(arg model)/config/denso_robot_controllers.yaml + + diff --git a/denso_robot_drivers_ros2.repos b/denso_robot_drivers_ros2.repos index 1aaf92b..58b508e 100644 --- a/denso_robot_drivers_ros2.repos +++ b/denso_robot_drivers_ros2.repos @@ -2,8 +2,8 @@ repositories: gazebo_ros2_control: type: git url: https://github.com/ros-simulation/gazebo_ros2_control.git - version: humble + version: humble ros2_control_demos: type: git url: https://github.com/ros-controls/ros2_control_demos.git - version: master + version: humble diff --git a/denso_robot_moveit_demo/src/denso_robot_moveit_demo.cpp b/denso_robot_moveit_demo/src/denso_robot_moveit_demo.cpp index 85bd239..41e2dce 100644 --- a/denso_robot_moveit_demo/src/denso_robot_moveit_demo.cpp +++ b/denso_robot_moveit_demo/src/denso_robot_moveit_demo.cpp @@ -56,7 +56,7 @@ class DensoRobotCppDemo node_->create_publisher("display_robot_state", 1)) { node_->declare_parameter("model", "cobotta"); - node_->declare_parameter("scale_factor", "1.0"); + node_->declare_parameter("scale_factor", 1.0); } void run() diff --git a/denso_robot_moveit_demo/src/denso_robot_moveit_pickandplace.cpp b/denso_robot_moveit_demo/src/denso_robot_moveit_pickandplace.cpp index b42c6c0..d927d2d 100644 --- a/denso_robot_moveit_demo/src/denso_robot_moveit_pickandplace.cpp +++ b/denso_robot_moveit_demo/src/denso_robot_moveit_pickandplace.cpp @@ -56,8 +56,8 @@ class DensoRobotPickAndPlaceDemo node_->create_publisher("display_robot_state", 1)) { node_->declare_parameter("model", ""); - node_->declare_parameter("scale_factor", ""); - node_->declare_parameter("num_cycles", ""); + node_->declare_parameter("scale_factor", 1.0); + node_->declare_parameter("num_cycles", 1); } void run() diff --git a/denso_robot_moveit_demo/src/denso_robot_moveit_pickandplace_scara.cpp b/denso_robot_moveit_demo/src/denso_robot_moveit_pickandplace_scara.cpp index c30e0ce..a39502d 100644 --- a/denso_robot_moveit_demo/src/denso_robot_moveit_pickandplace_scara.cpp +++ b/denso_robot_moveit_demo/src/denso_robot_moveit_pickandplace_scara.cpp @@ -55,8 +55,8 @@ class DensoRobotPickAndPlaceDemo node_->create_publisher("display_robot_state", 1)) { node_->declare_parameter("model", ""); - node_->declare_parameter("scale_factor", ""); - node_->declare_parameter("num_cycles", ""); + node_->declare_parameter("scale_factor", 1.0); + node_->declare_parameter("num_cycles", 1); } void run() From 0edb39b2c5301f2714b785c370b2333bc48b9db7 Mon Sep 17 00:00:00 2001 From: cboostjvisser <89262699+cboostjvisser@users.noreply.github.com> Date: Thu, 8 Feb 2024 09:14:28 +0100 Subject: [PATCH 2/2] Apply suggestions from code review Fix indentation Co-authored-by: Daisuke Sato --- .../robots/cobotta/urdf/denso_robot.ros2_control.xacro | 4 ++-- .../robots/hsr065a1_n32/urdf/denso_robot.ros2_control.xacro | 4 ++-- .../robots/vs060/urdf/denso_robot.ros2_control.xacro | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/denso_robot_descriptions/robots/cobotta/urdf/denso_robot.ros2_control.xacro b/denso_robot_descriptions/robots/cobotta/urdf/denso_robot.ros2_control.xacro index a6688f2..aa7b926 100644 --- a/denso_robot_descriptions/robots/cobotta/urdf/denso_robot.ros2_control.xacro +++ b/denso_robot_descriptions/robots/cobotta/urdf/denso_robot.ros2_control.xacro @@ -14,8 +14,8 @@ "> - - + + ign_ros2_control/IgnitionSystem diff --git a/denso_robot_descriptions/robots/hsr065a1_n32/urdf/denso_robot.ros2_control.xacro b/denso_robot_descriptions/robots/hsr065a1_n32/urdf/denso_robot.ros2_control.xacro index 041b867..bf69dca 100644 --- a/denso_robot_descriptions/robots/hsr065a1_n32/urdf/denso_robot.ros2_control.xacro +++ b/denso_robot_descriptions/robots/hsr065a1_n32/urdf/denso_robot.ros2_control.xacro @@ -14,8 +14,8 @@ "> - - + + ign_ros2_control/IgnitionSystem diff --git a/denso_robot_descriptions/robots/vs060/urdf/denso_robot.ros2_control.xacro b/denso_robot_descriptions/robots/vs060/urdf/denso_robot.ros2_control.xacro index a6688f2..aa7b926 100644 --- a/denso_robot_descriptions/robots/vs060/urdf/denso_robot.ros2_control.xacro +++ b/denso_robot_descriptions/robots/vs060/urdf/denso_robot.ros2_control.xacro @@ -14,8 +14,8 @@ "> - - + + ign_ros2_control/IgnitionSystem