Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue in spawn_entity.py ROS2 version #1525

Open
RDaneelOlivav opened this issue Mar 21, 2024 · 0 comments
Open

Issue in spawn_entity.py ROS2 version #1525

RDaneelOlivav opened this issue Mar 21, 2024 · 0 comments

Comments

@RDaneelOlivav
Copy link

Hi I got the error:

[INFO] [1711033583.879509419] [spawn_entity]: Spawn Entity started
[INFO] [1711033583.881519221] [spawn_entity]: Loading entity XML from file /home/user/ros2_ws/src/grasp_box_mini.urdf
Traceback (most recent call last):
  File "/opt/ros/humble/lib/gazebo_ros/spawn_entity.py", line 370, in <module>
    main()
  File "/opt/ros/humble/lib/gazebo_ros/spawn_entity.py", line 365, in main
    exit_code = spawn_entity_node.run()
  File "/opt/ros/humble/lib/gazebo_ros/spawn_entity.py", line 143, in run    self.get_logger().error('Error: specified file %s does not exist', self.args.file)
TypeError: RcutilsLogger.error() takes 2 positional arguments but 3 were given
[ros2run]: Process exited with failure 1

I solved it by changing:

self.get_logger().error('Error: specified file %s does not exist', self.args.file)

To

self.get_logger().error(f'Error: specified file {self.args.file} does not exist')

I imagine this issue apperaed recently because I worked some days ago with it and it worked perfectly.

In case someone has this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant