Skip to content

Commit

Permalink
Use the urdf_ member for _Jazzy_
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanscherzinger committed Oct 20, 2024
1 parent 106e3a8 commit b3a12c5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Cmake will update these defines depending on our current ROS_DISTRO.
// We use this mechanism to react to API changes in ROS2-control.
//
#cmakedefine CARTESIAN_CONTROLLERS_FOXY
#cmakedefine CARTESIAN_CONTROLLERS_GALACTIC

#cmakedefine CARTESIAN_CONTROLLERS_HUMBLE
#cmakedefine CARTESIAN_CONTROLLERS_IRON
#cmakedefine CARTESIAN_CONTROLLERS_JAZZY
5 changes: 5 additions & 0 deletions cartesian_controller_base/src/cartesian_controller_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,12 @@ CartesianControllerBase::on_configure(const rclcpp_lifecycle::State & previous_s
urdf::Model robot_model;
KDL::Tree robot_tree;

#if defined CARTESIAN_CONTROLLERS_JAZZY
m_robot_description = this->get_robot_description();
#else
m_robot_description = get_node()->get_parameter("robot_description").as_string();
#endif

if (m_robot_description.empty())
{
RCLCPP_ERROR(get_node()->get_logger(), "robot_description is empty");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def generate_launch_description():
control_node = Node(
package="controller_manager",
executable="ros2_control_node",
parameters=[robot_controllers],
parameters=[robot_description, robot_controllers],
# prefix="screen -d -m gdb -command=/home/stefan/.gdb_debug_config --ex run --args", # noqa E501
output="both",
remappings=[
Expand Down

0 comments on commit b3a12c5

Please sign in to comment.