diff --git a/example_1/bringup/launch/rrbot.launch.py b/example_1/bringup/launch/rrbot.launch.py index e25a132ab..0de1813d1 100644 --- a/example_1/bringup/launch/rrbot.launch.py +++ b/example_1/bringup/launch/rrbot.launch.py @@ -67,7 +67,7 @@ def generate_launch_description(): control_node = Node( package="controller_manager", executable="ros2_control_node", - parameters=[robot_description, robot_controllers], + parameters=[robot_controllers], output="both", ) robot_state_pub_node = Node( diff --git a/example_10/bringup/launch/rrbot.launch.py b/example_10/bringup/launch/rrbot.launch.py index 9326d4690..7e975d565 100644 --- a/example_10/bringup/launch/rrbot.launch.py +++ b/example_10/bringup/launch/rrbot.launch.py @@ -50,7 +50,7 @@ def generate_launch_description(): control_node = Node( package="controller_manager", executable="ros2_control_node", - parameters=[robot_description, robot_controllers], + parameters=[robot_controllers], output="both", ) robot_state_pub_node = Node( diff --git a/example_11/bringup/launch/carlikebot.launch.py b/example_11/bringup/launch/carlikebot.launch.py index a15ea1256..4a7adce19 100644 --- a/example_11/bringup/launch/carlikebot.launch.py +++ b/example_11/bringup/launch/carlikebot.launch.py @@ -78,7 +78,6 @@ def generate_launch_description(): parameters=[robot_controllers], output="both", remappings=[ - ("~/robot_description", "/robot_description"), ("/bicycle_steering_controller/tf_odometry", "/tf"), ], condition=IfCondition(remap_odometry_tf), @@ -88,9 +87,7 @@ def generate_launch_description(): executable="ros2_control_node", parameters=[robot_controllers], output="both", - remappings=[ - ("~/robot_description", "/robot_description"), - ], + remappings=[], condition=UnlessCondition(remap_odometry_tf), ) robot_state_pub_bicycle_node = Node( @@ -98,9 +95,6 @@ def generate_launch_description(): executable="robot_state_publisher", output="both", parameters=[robot_description], - remappings=[ - ("~/robot_description", "/robot_description"), - ], ) rviz_node = Node( package="rviz2", diff --git a/example_12/bringup/launch/rrbot.launch.py b/example_12/bringup/launch/rrbot.launch.py index 07b4a486b..b89c521ed 100644 --- a/example_12/bringup/launch/rrbot.launch.py +++ b/example_12/bringup/launch/rrbot.launch.py @@ -53,7 +53,7 @@ def generate_launch_description(): control_node = Node( package="controller_manager", executable="ros2_control_node", - parameters=[robot_description, robot_controllers], + parameters=[robot_controllers], output="both", ) robot_state_pub_node = Node( diff --git a/example_14/bringup/launch/rrbot_modular_actuators_without_feedback_sensors_for_position_feedback.launch.py b/example_14/bringup/launch/rrbot_modular_actuators_without_feedback_sensors_for_position_feedback.launch.py index f988a5c70..6c263c12d 100644 --- a/example_14/bringup/launch/rrbot_modular_actuators_without_feedback_sensors_for_position_feedback.launch.py +++ b/example_14/bringup/launch/rrbot_modular_actuators_without_feedback_sensors_for_position_feedback.launch.py @@ -96,7 +96,7 @@ def generate_launch_description(): control_node = Node( package="controller_manager", executable="ros2_control_node", - parameters=[robot_description, robot_controllers], + parameters=[robot_controllers], output="both", ) robot_state_pub_node = Node( diff --git a/example_14/hardware/rrbot_actuator_without_feedback.cpp b/example_14/hardware/rrbot_actuator_without_feedback.cpp index 3c7a6b887..6feb8067c 100644 --- a/example_14/hardware/rrbot_actuator_without_feedback.cpp +++ b/example_14/hardware/rrbot_actuator_without_feedback.cpp @@ -183,21 +183,23 @@ hardware_interface::return_type RRBotActuatorWithoutFeedback::read( hardware_interface::return_type ros2_control_demo_example_14::RRBotActuatorWithoutFeedback::write( const rclcpp::Time & /*time*/, const rclcpp::Duration & /*period*/) { - // START: This part here is for exemplary purposes - Please do not copy to your production code - RCLCPP_INFO( - rclcpp::get_logger("RRBotActuatorWithoutFeedback"), "Writing command: %f", hw_joint_command_); - - // Simulate sending commands to the hardware - std::ostringstream data; - data << hw_joint_command_; - RCLCPP_INFO( - rclcpp::get_logger("RRBotActuatorWithoutFeedback"), "Sending data command: %s", - data.str().c_str()); - send(sock_, data.str().c_str(), strlen(data.str().c_str()), 0); + if (std::isfinite(hw_joint_command_)) + { + // START: This part here is for exemplary purposes - Please do not copy to your production code + RCLCPP_INFO( + rclcpp::get_logger("RRBotActuatorWithoutFeedback"), "Writing command: %f", hw_joint_command_); - RCLCPP_INFO(rclcpp::get_logger("RRBotActuatorWithoutFeedback"), "Joints successfully written!"); - // END: This part here is for exemplary purposes - Please do not copy to your production code + // Simulate sending commands to the hardware + std::ostringstream data; + data << hw_joint_command_; + RCLCPP_INFO( + rclcpp::get_logger("RRBotActuatorWithoutFeedback"), "Sending data command: %s", + data.str().c_str()); + send(sock_, data.str().c_str(), strlen(data.str().c_str()), 0); + RCLCPP_INFO(rclcpp::get_logger("RRBotActuatorWithoutFeedback"), "Joints successfully written!"); + // END: This part here is for exemplary purposes - Please do not copy to your production code + } return hardware_interface::return_type::OK; } diff --git a/example_2/bringup/launch/diffbot.launch.py b/example_2/bringup/launch/diffbot.launch.py index 7a71af0b8..04b454a0f 100644 --- a/example_2/bringup/launch/diffbot.launch.py +++ b/example_2/bringup/launch/diffbot.launch.py @@ -73,7 +73,7 @@ def generate_launch_description(): control_node = Node( package="controller_manager", executable="ros2_control_node", - parameters=[robot_description, robot_controllers], + parameters=[robot_controllers], output="both", ) robot_state_pub_node = Node( diff --git a/example_3/bringup/launch/rrbot_system_multi_interface.launch.py b/example_3/bringup/launch/rrbot_system_multi_interface.launch.py index e10c7997e..969cf745f 100644 --- a/example_3/bringup/launch/rrbot_system_multi_interface.launch.py +++ b/example_3/bringup/launch/rrbot_system_multi_interface.launch.py @@ -119,7 +119,7 @@ def generate_launch_description(): control_node = Node( package="controller_manager", executable="ros2_control_node", - parameters=[robot_description, robot_controllers], + parameters=[robot_controllers], output="both", ) robot_state_pub_node = Node( diff --git a/example_4/bringup/launch/rrbot_system_with_sensor.launch.py b/example_4/bringup/launch/rrbot_system_with_sensor.launch.py index b95039147..857d5963e 100644 --- a/example_4/bringup/launch/rrbot_system_with_sensor.launch.py +++ b/example_4/bringup/launch/rrbot_system_with_sensor.launch.py @@ -111,7 +111,7 @@ def generate_launch_description(): control_node = Node( package="controller_manager", executable="ros2_control_node", - parameters=[robot_description, robot_controllers], + parameters=[robot_controllers], output="both", ) robot_state_pub_node = Node( diff --git a/example_5/bringup/launch/rrbot_system_with_external_sensor.launch.py b/example_5/bringup/launch/rrbot_system_with_external_sensor.launch.py index 229195642..675499902 100755 --- a/example_5/bringup/launch/rrbot_system_with_external_sensor.launch.py +++ b/example_5/bringup/launch/rrbot_system_with_external_sensor.launch.py @@ -111,7 +111,7 @@ def generate_launch_description(): control_node = Node( package="controller_manager", executable="ros2_control_node", - parameters=[robot_description, robot_controllers], + parameters=[robot_controllers], output="both", ) robot_state_pub_node = Node( diff --git a/example_6/bringup/launch/rrbot_modular_actuators.launch.py b/example_6/bringup/launch/rrbot_modular_actuators.launch.py index 24821fd70..8c097d899 100644 --- a/example_6/bringup/launch/rrbot_modular_actuators.launch.py +++ b/example_6/bringup/launch/rrbot_modular_actuators.launch.py @@ -119,7 +119,7 @@ def generate_launch_description(): control_node = Node( package="controller_manager", executable="ros2_control_node", - parameters=[robot_description, robot_controllers], + parameters=[robot_controllers], output="both", ) robot_state_pub_node = Node( diff --git a/example_7/bringup/launch/r6bot_controller.launch.py b/example_7/bringup/launch/r6bot_controller.launch.py index bc3e048ba..135c69453 100644 --- a/example_7/bringup/launch/r6bot_controller.launch.py +++ b/example_7/bringup/launch/r6bot_controller.launch.py @@ -52,7 +52,7 @@ def generate_launch_description(): control_node = Node( package="controller_manager", executable="ros2_control_node", - parameters=[robot_description, robot_controllers], + parameters=[robot_controllers], remappings=[ ( "/forward_position_controller/commands", diff --git a/example_8/bringup/launch/rrbot_transmissions_system_position_only.launch.py b/example_8/bringup/launch/rrbot_transmissions_system_position_only.launch.py index f42999770..4476a3f35 100644 --- a/example_8/bringup/launch/rrbot_transmissions_system_position_only.launch.py +++ b/example_8/bringup/launch/rrbot_transmissions_system_position_only.launch.py @@ -96,7 +96,7 @@ def generate_launch_description(): control_node = Node( package="controller_manager", executable="ros2_control_node", - parameters=[robot_description, robot_controllers], + parameters=[robot_controllers], output="both", ) robot_state_pub_node = Node( diff --git a/example_9/bringup/launch/rrbot.launch.py b/example_9/bringup/launch/rrbot.launch.py index 2a61c1cee..fbc54bcc0 100644 --- a/example_9/bringup/launch/rrbot.launch.py +++ b/example_9/bringup/launch/rrbot.launch.py @@ -68,7 +68,7 @@ def generate_launch_description(): control_node = Node( package="controller_manager", executable="ros2_control_node", - parameters=[robot_description, robot_controllers], + parameters=[robot_controllers], output="both", ) robot_state_pub_node = Node(