I have been searching for a solution to my problem but am unable to find any solutions for my problem that are also using Python. I am trying to run Universal Robot's UR10e in gazebo and control it using ROS2_control.
I am running ROS2 Iron and Gazebo 11.
This is the error I continue to get:
gazebo-1] [ERROR] [1689265614.750035709] [gazebo_ros2_control]: parser error Couldn't parse params file: '--params-file $(find sim)/Controller_config.yaml'.
Error: Error opening YAML file, at ./src/parser.c:271, at ./src/rcl/arguments.c:406
My Setup.py already puts the YAML file into my install folder. I am trying to run my YAML file through my URDF rather than my launch file. My launch file launches the URDF and Gazebo together
Here is a snippet of my Setup.py:
setup(
name=package_name,
version='0.0.0',
packages=find_packages(exclude=['test']),
data_files=[
('share/ament_index/resource_index/packages',
['resource/' + package_name]),
('share/' + package_name, ['package.xml', 'launch/simulation.launch.py']),
('share/' + package_name, ['package.xml', 'description/urdf/ur10e.urdf']),
('share/' + package_name, ['package.xml', 'description/urdf/config/Controller_config.yaml']),
],
Here is my YAML file I am trying to load:
controller_manager:
ros_parameters:
update_rate: 100 #Hz
joint_trajectory_controller:
type: joint_trajectory_controller/JointTrajectoryController
joint_state_broadcaster:
type: joint_state_broadcaster/JointStateBroadcaster
joint_trajectory_controller:
ros_parameters:
joints:
- base_joint
- shoulder_pan_joint
- shoulder_lift_joint
- elbow_joint
- wrist_1_joint
- wrist_2_joint
- wrist_3_joint
interface_name:
- position
state_interfaces:
- position
- velocity
Here is the Plugin I am using in my URDF to load the YAML:
<gazebo>
<plugin filename="libgazebo_ros2_control.so" name="gazebo_ros2_control">
<parameters>$(find sim)/Controller_config.yaml</parameters>
</plugin>
</gazebo>
I also have that issue. "parser error Couldn't parse params file: ", I think joint_trajectory_controller is the problem. try to add "" to param values.