ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

[ROS2] Cannot add parameter to ros2 control

asked 2023-03-12 14:46:11 -0500

Confused_Robotics gravatar image

In my .xacro file, I am adding ros2 control with the following snippet:

<gazebo>
    <plugin filename="libgazebo_ros2_control.so" name="gazebo_ros2_control">
      <parameters>$(find auto_park)/config/controllers.yaml</parameters>
    </plugin>
</gazebo>

When I run the following commands to launch the simulation:

source /opt/ros/humble/setup.bash
ros2 launch auto_park launch_sim.launch.py

I receive the following error:

Caught exception in launch (see debug for traceback): substitution args not supported:  No module named 'roslaunch'

If I remove the snippet where ros2 control is added, the simulation is able to launch. Any idea what might be the issue?

The following is controllers.yaml:

controller_manager:
  ros__parameters:
    update_rate: 30
    use_sim_time: true

    diff_drive_controller:
      type: diff_drive_controller/DiffDriveController

    joint_state_broadcaster:
      type: joint_state_broadcaster/JointStateBroadcaster

diff_drive_controller:
  ros__parameters:

    publish_rate: 50.0

    base_frame_id: base_footprint

    left_wheel_names: ['wheel_left_joint']
    right_wheel_names: ['wheel_right_joint']
    wheel_separation: 0.160
    wheel_radius: 0.033

    use_stamped_vel: false
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-03-24 11:21:34 -0500

Confused_Robotics gravatar image

Uninstalled and reinstalled ros2 humble and all of its dependencies. Then ran sudo apt update and sudo apt upgrade. That fixed the missing roslaunch error.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2023-03-12 14:46:11 -0500

Seen: 422 times

Last updated: Mar 24 '23