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

OccupancyGrid' object has no attribute '_slot_types' #638 #885

Open
jesusramondovale opened this issue Oct 23, 2023 · 6 comments
Open

OccupancyGrid' object has no attribute '_slot_types' #638 #885

jesusramondovale opened this issue Oct 23, 2023 · 6 comments
Labels

Comments

@jesusramondovale
Copy link

  • Library Version: latest
  • ROS Version: Humble
  • Platform / OS: Ubuntu 22.04

I'm using ros3djs on my ASP.NET webpage (cshtml) and when I try to visualize a 3D map the ros_server service executed in my ROS machine stops and gives the error :

"OccupancyGrid' object has no attribute '_slot_types'"

`File "/opt/ros/humble/local/lib/python3.10/dist-packages/rosbridge_library/capabilities/subscribe.py", line 159, in _publish
    self.publish(message, self.fragment_size, self.compression)
  File "/opt/ros/humble/local/lib/python3.10/dist-packages/rosbridge_library/capabilities/subscribe.py", line 318, in publish
    outgoing_msg = message.get_cbor(outgoing_msg)
  File "/opt/ros/humble/local/lib/python3.10/dist-packages/rosbridge_library/internal/outgoing_message.py", line 38, in get_cbor
    outgoing_msg["msg"] = self.get_cbor_values()
  File "/opt/ros/humble/local/lib/python3.10/dist-packages/rosbridge_library/internal/outgoing_message.py", line 33, in get_cbor_values
    self._cbor_values = extract_cbor_values(self._message)
  File "/opt/ros/humble/local/lib/python3.10/dist-packages/rosbridge_library/internal/cbor_conversion.py", line 53, in extract_cbor_values
    for slot, slot_type in zip(msg.__slots__, msg._slot_types):
AttributeError: 'OccupancyGrid' object has no attribute '_slot_types'`
@dzw-tw
Copy link

dzw-tw commented Apr 11, 2024

I also have this problem, have you solved it?

@chanhhoang99
Copy link

For whom who get this error, I believe you are installing your rosbridge_suite from apt which is out of date.
I tried building rosbridge_suite from source, seems to work fine at least with ros3djs.
Of it's still not working, you may try to set compression value to false

@jesusramondovale
Copy link
Author

I also have this problem, have you solved it?

It was a .js file versions conflict

@luojinzhang
Copy link

I am having the same thing, I indeed installed it using sudo apt-get install ros-humble-rosbridge-suite, any official fixing on this ? For workaround I guess it would be building the latest rosbridge_suite locally ? Thank you.

@jesusramondovale
Copy link
Author

jesusramondovale commented Jun 25, 2024

The problem was a conflict between versions on client side (ros3djs JavaScript imported files) nothing to do with ros-bridge installation on server side.

@jesusramondovale
Copy link
Author

I am having the same thing, I indeed installed it using sudo apt-get install ros-humble-rosbridge-suite, any official fixing on this ? For workaround I guess it would be building the latest rosbridge_suite locally ? Thank you.

My case isn't a problem of ROS-Bridge, but you could try increasing the parameter "maximum fragment size" on ros-bridge configuration (or something like that)

When a map is bigger than the fragment size, it needs more than one fragment and the Ros JS client side doesn't work well with that. I think you have to manually rebuild the data of multiple fragments into one on client side, or basically increase the fragment size on server side in order to avoid this

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

No branches or pull requests

4 participants