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

Minor URDF/RViz problems on Bionic/Melodic #67

Open
mjbogusz opened this issue Aug 12, 2019 · 3 comments
Open

Minor URDF/RViz problems on Bionic/Melodic #67

mjbogusz opened this issue Aug 12, 2019 · 3 comments

Comments

@mjbogusz
Copy link

I'm having some problems with URDF spawner and RViz under Ubuntu 18.04 with ROS Melodic.
I've built the demo using catkin build, launching via roslaunch car_demo demo.launch.

Isolating these issues, gazebo_ros/spawn_urdf fails with main error being

Spawn service failed. Exiting.
[spawn_urdf-5] process has died [pid 10330, exit code 1, cmd /opt/ros/melodic/lib/gazebo_ros/spawn_model -param robot_description -urdf -x 3 -y -12 -z 0.5 -model prius __name:=spawn_urdf __log:=/home/mjbogusz/.ros/log/02b9b0ea-bcfb-11e9-b0a6-04d4c425ad81/spawn_urdf-5.log].
log file: /home/mjbogusz/.ros/log/02b9b0ea-bcfb-11e9-b0a6-04d4c425ad81/spawn_urdf-5*.log

And logs containing

$ cat /home/mjbogusz/.ros/log/07ea22b4-bcf8-11e9-b0a6-04d4c425ad81/spawn_urdf-4.log
[rospy.client][INFO] 2019-08-12 13:55:09,172: init_node, name[/spawn_urdf], pid[8305]
[xmlrpc][INFO] 2019-08-12 13:55:09,172: XML-RPC server binding to 0.0.0.0:0
[xmlrpc][INFO] 2019-08-12 13:55:09,172: Started XML-RPC server [http://mjbogusz-desktop:43923/]
[rospy.init][INFO] 2019-08-12 13:55:09,173: ROS Slave URI: [http://mjbogusz-desktop:43923/]
[rospy.impl.masterslave][INFO] 2019-08-12 13:55:09,173: _ready: http://mjbogusz-desktop:43923/
[rospy.registration][INFO] 2019-08-12 13:55:09,173: Registering with master node http://localhost:11311
[xmlrpc][INFO] 2019-08-12 13:55:09,173: xml rpc node: starting XML-RPC server
[rospy.init][INFO] 2019-08-12 13:55:09,273: registered with master
[rospy.rosout][INFO] 2019-08-12 13:55:09,273: initializing /rosout core topic
[rospy.rosout][INFO] 2019-08-12 13:55:09,274: connected to core topic /rosout
[rospy.simtime][INFO] 2019-08-12 13:55:09,275: initializing /clock core topic
[rospy.simtime][INFO] 2019-08-12 13:55:09,276: connected to core topic /clock
[rosout][INFO] 2019-08-12 13:55:09,278: Loading model XML from ros parameter robot_description
[rosout][INFO] 2019-08-12 13:55:09,288: Waiting for service /gazebo/spawn_urdf_model
[rospy.internal][INFO] 2019-08-12 13:55:09,563: topic[/rosout] adding connection to [/rosout], count 0
[rosout][INFO] 2019-08-12 13:55:09,890: Calling service /gazebo/spawn_urdf_model
[rospy.internal][INFO] 2019-08-12 13:55:09,901: topic[/clock] adding connection to [http://mjbogusz-desktop:33325/], count 0
[rosout][INFO] 2019-08-12 13:55:10,296: Spawn status: SpawnModel: Entity pushed to spawn queue, but spawn service timed out waiting for entity to appear in simulation under the name prius
[rosout][ERROR] 2019-08-12 13:55:10,297: Spawn service failed. Exiting.
[rospy.core][INFO] 2019-08-12 13:55:10,298: signal_shutdown [atexit]
[rospy.internal][INFO] 2019-08-12 13:55:10,299: topic[/rosout] removing connection to /rosout
[rospy.internal][INFO] 2019-08-12 13:55:10,299: topic[/clock] removing connection to http://mjbogusz-desktop:33325/
[rospy.impl.masterslave][INFO] 2019-08-12 13:55:10,299: atexit

$ cat /home/mjbogusz/.ros/log/07ea22b4-bcf8-11e9-b0a6-04d4c425ad81/spawn_urdf-4-stdout.log 
[INFO] [1565610909.278173, 0.000000]: Loading model XML from ros parameter robot_description
[INFO] [1565610909.288160, 0.000000]: Waiting for service /gazebo/spawn_urdf_model
[INFO] [1565610909.890910, 0.000000]: Calling service /gazebo/spawn_urdf_model
[INFO] [1565610910.296765, 1341.708000]: Spawn status: SpawnModel: Entity pushed to spawn queue, but spawn service timed out waiting for entity to appear in simulation under the name prius

While RViz logs more cryptic (with nothing in log files)

[ERROR] [1565612189.653336245]: XML parse error [package://prius_description/meshes/hybrid_body.obj]: XML_ERROR_PARSING_TEXT
[ERROR] [1565612189.670629088]: XML parse error [package://prius_description/meshes/wheel.obj]: XML_ERROR_PARSING_TEXT
[ERROR] [1565612189.672880491]: XML parse error [package://prius_description/meshes/steering_wheel.obj]: XML_ERROR_PARSING_TEXT
@mjbogusz
Copy link
Author

Just to clarify: this causes the model not to be displayed in RViz and the spawn_model to crash (I'm not sure whether that could lead to another issues).

This seems to be the result of using .obj models for the car - while Gazebo supports and can correctly render these, RViz cannot. I'll try converting them to Collada.

@mjbogusz
Copy link
Author

After converting to Collada (.dae) and fixing non-existent texture for windows (Meshlab added a "notexture.png" entry that caused crashes in ColladaLoader) I've managed to fix the XML parse errors, but spawn_model still crashes. This time the logs contain the following:

$ cat /home/mjbogusz/.ros/log/596014d8-bdab-11e9-b0a6-04d4c425ad81/spawn_urdf-9-stdout.log 
[INFO] [1565687925.939001, 0.000000]: Loading model XML from ros parameter robot_description
[INFO] [1565687925.949219, 0.000000]: Waiting for service /gazebo/spawn_urdf_model
[INFO] [1565687926.852669, 0.000000]: Calling service /gazebo/spawn_urdf_model
[INFO] [1565687927.250713, 1341.708000]: Spawn status: SpawnModel: Entity pushed to spawn queue, but spawn service timed out waiting for entity to appear in simulation under the name prius

$ cat /home/mjbogusz/.ros/log/596014d8-bdab-11e9-b0a6-04d4c425ad81/spawn_urdf-9.log 
[rospy.client][INFO] 2019-08-13 11:18:45,833: init_node, name[/spawn_urdf], pid[24556]
[xmlrpc][INFO] 2019-08-13 11:18:45,833: XML-RPC server binding to 0.0.0.0:0
[xmlrpc][INFO] 2019-08-13 11:18:45,833: Started XML-RPC server [http://mjbogusz-desktop:45137/]
[rospy.init][INFO] 2019-08-13 11:18:45,833: ROS Slave URI: [http://mjbogusz-desktop:45137/]
[rospy.impl.masterslave][INFO] 2019-08-13 11:18:45,833: _ready: http://mjbogusz-desktop:45137/
[rospy.registration][INFO] 2019-08-13 11:18:45,834: Registering with master node http://localhost:11311
[xmlrpc][INFO] 2019-08-13 11:18:45,834: xml rpc node: starting XML-RPC server
[rospy.init][INFO] 2019-08-13 11:18:45,933: registered with master
[rospy.rosout][INFO] 2019-08-13 11:18:45,934: initializing /rosout core topic
[rospy.rosout][INFO] 2019-08-13 11:18:45,935: connected to core topic /rosout
[rospy.simtime][INFO] 2019-08-13 11:18:45,936: initializing /clock core topic
[rospy.simtime][INFO] 2019-08-13 11:18:45,937: connected to core topic /clock
[rosout][INFO] 2019-08-13 11:18:45,938: Loading model XML from ros parameter robot_description
[rosout][INFO] 2019-08-13 11:18:45,949: Waiting for service /gazebo/spawn_urdf_model
[rospy.internal][INFO] 2019-08-13 11:18:46,168: topic[/rosout] adding connection to [/rosout], count 0
[rospy.internal][INFO] 2019-08-13 11:18:46,813: topic[/clock] adding connection to [http://mjbogusz-desktop:36259/], count 0
[rosout][INFO] 2019-08-13 11:18:46,852: Calling service /gazebo/spawn_urdf_model
[rosout][INFO] 2019-08-13 11:18:47,250: Spawn status: SpawnModel: Entity pushed to spawn queue, but spawn service timed out waiting for entity to appear in simulation under the name prius
[rosout][ERROR] 2019-08-13 11:18:47,251: Spawn service failed. Exiting.
[rospy.core][INFO] 2019-08-13 11:18:47,252: signal_shutdown [atexit]
[rospy.internal][INFO] 2019-08-13 11:18:47,253: topic[/rosout] removing connection to /rosout
[rospy.internal][INFO] 2019-08-13 11:18:47,254: topic[/clock] removing connection to http://mjbogusz-desktop:36259/
[rospy.internal][WARNING] 2019-08-13 11:18:47,254: Unknown error initiating TCP/IP socket to mjbogusz-desktop:53323 (http://mjbogusz-desktop:36259/): Traceback (most recent call last):
  File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/impl/tcpros_base.py", line 558, in connect
    self.read_header()
  File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/impl/tcpros_base.py", line 653, in read_header
    self._validate_header(read_ros_handshake_header(sock, self.read_buff, self.protocol.buff_size))
AttributeError: 'NoneType' object has no attribute 'buff_size'

[rospy.topics][ERROR] 2019-08-13 11:18:47,254: Traceback (most recent call last):
  File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/topics.py", line 326, in close
    c.close()
  File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/impl/tcpros_base.py", line 841, in close
    self.socket.close()
AttributeError: 'NoneType' object has no attribute 'close'

[rospy.impl.masterslave][INFO] 2019-08-13 11:18:47,255: atexit

@marcin-sielski
Copy link

I have fixed this issue with following PR:
ros-simulation/gazebo_ros_pkgs#1024

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

2 participants