You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error appeared after command ros2 run gazebo_ros spawn_entity.py -entity solo12dof_quadruped -file ~/git/robot_programming_course/catkin_ws/src/solo12dof_quadruped/urdf/solo12dof_quadruped.urdf -x 0 -y 0 -z 1:
[INFO] [1680612612.664726268] [spawn_entity]: Spawn Entity started
[INFO] [1680612612.665737877] [spawn_entity]: Loading entity XML from file /home/dvogureckiy99/git/robot_programming_course/catkin_ws/src/solo12dof_quadruped/urdf/solo12dof_quadruped.urdf
Traceback (most recent call last):
File "/home/dvogureckiy99/gazebo_ros_pkgs_ws/install/gazebo_ros/lib/gazebo_ros/spawn_entity.py", line 370, in <module>
main()
File "/home/dvogureckiy99/gazebo_ros_pkgs_ws/install/gazebo_ros/lib/gazebo_ros/spawn_entity.py", line 365, in main
exit_code = spawn_entity_node.run()
File "/home/dvogureckiy99/gazebo_ros_pkgs_ws/install/gazebo_ros/lib/gazebo_ros/spawn_entity.py", line 192, in run
xml_parsed = ElementTree.fromstring(entity_xml)
File "src/lxml/etree.pyx", line 3235, in lxml.etree.fromstring
File "src/lxml/parser.pxi", line 1871, in lxml.etree._parseMemoryDocument
ValueError: Unicode strings with encoding declaration are not supported. Please use bytes input or XML fragments without declaration.
[ros2run]: Process exited with failure 1
The text was updated successfully, but these errors were encountered:
Thanks to chatgpt I solve this problem by adding on line 192 file's ~/gazebo_ros_pkgs_ws/src/gazebo_ros_pkgs/gazebo_ros/scripts/spawn_entity.py:
entity_xml_bytes = entity_xml.encode('utf-8')
I use :
Error appeared after command
ros2 run gazebo_ros spawn_entity.py -entity solo12dof_quadruped -file ~/git/robot_programming_course/catkin_ws/src/solo12dof_quadruped/urdf/solo12dof_quadruped.urdf -x 0 -y 0 -z 1
:The text was updated successfully, but these errors were encountered: