Giter Site home page Giter Site logo

Comments (7)

kschwan avatar kschwan commented on June 12, 2024

It turns out I hadn't noticed that I was getting this error from rqt_publisher

[ERROR] [1663763988.089399671] [get_message_class]: Malformed message_type: sequence<string>
Traceback (most recent call last):
  File "/opt/ros/humble/lib/python3.10/site-packages/rqt_publisher/publisher.py", line 161, in change_publisher
    new_text = handler(self._publishers[publisher_id], topic_name, new_value)
  File "/opt/ros/humble/lib/python3.10/site-packages/rqt_publisher/publisher.py", line 244, in _change_publisher_expression
    success, _ = self._evaluate_expression(expression, slot_type)
  File "/opt/ros/humble/lib/python3.10/site-packages/rqt_publisher/publisher.py", line 329, in _evaluate_expression
    if successful_eval and isinstance(value, slot_type):
TypeError: isinstance() arg 2 must be a type, a tuple of types, or a union

from rqt_publisher.

gbiggs avatar gbiggs commented on June 12, 2024

Could you try Rolling and see if the same bug is present there as well?

from rqt_publisher.

kschwan avatar kschwan commented on June 12, 2024

Could you try Rolling and see if the same bug is present there as well?

Sure! Thanks for the suggestion.

If I type in a list in the position expression, I get the error shown below. If I type in an array.array (fx array('d', [123])), it works. The sequence<double> type is a bit misleading though.

Publisher._evaluate_expression(): failed to evaluate expression: "[123]" as Python type "<class 'array.array'>

Screenshot from 2022-09-29 09-56-22

from rqt_publisher.

gbiggs avatar gbiggs commented on June 12, 2024

Are you happy with that solution?

from rqt_publisher.

kschwan avatar kschwan commented on June 12, 2024

Are you happy with that solution?

Yes, I'm fine using rolling and typing in an array.array, thanks! It would be nice if typing in a list would work too though -- that's how it was on ROS1.

from rqt_publisher.

clalancette avatar clalancette commented on June 12, 2024

Yes, I'm fine using rolling and typing in an array.array, thanks! It would be nice if typing in a list would work too though -- that's how it was on ROS1.

Yeah, I agree, that would be much nicer. I did some work on this earlier this year, but I never got it completed. Hopefully I can find some time to complete that.

That said, this is similar in spirit to #23. @gbiggs I'm not sure if you want to close #23 (since technically that one works now) and leave this one open, or vice-versa. Either is fine with me.

from rqt_publisher.

gbiggs avatar gbiggs commented on June 12, 2024

I'll close this one, since the other looks like it still has proposed changes that haven't been PR'd.

from rqt_publisher.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.