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

Unable to subscribe and plot to my custom LCM Message #39

Open
zulfiqar-zaidi opened this issue Jun 28, 2019 · 1 comment
Open

Unable to subscribe and plot to my custom LCM Message #39

zulfiqar-zaidi opened this issue Jun 28, 2019 · 1 comment

Comments

@zulfiqar-zaidi
Copy link

zulfiqar-zaidi commented Jun 28, 2019

I am trying to use lcm-signal-scope to plot values from my custom LCM message. My LCM message has the following definition:

`struct my_message {
// The timestamp in microseconds.
int64_t utime;

// position
float q[23];

// velocity
float v[22];
}`

The name of the channel is "MY_MESSAGE". I wrote the following python script to plot the signal:

addSignal('MY_MESSAGE', msg.utime, msg.q[0])

I used the following command to run the signal scope:

$ build/bin/signal-scope examples/example9.py

I get the following error:
File "<string>", line 143, in decodeMessageFunction
KeyError: 'R\xff\xd3\tO\x1a\x9b\x1f'

Any suggestions to overcome this issue will be highly appreciated.

@patmarion
Copy link
Member

That error indicates that signal-scope wasn't able to determine the message type. Sorry, that error message isn't very helpful.

When signal-scope starts it will search for lcm messages types and print information about all the types that it finds. You'll see information printed in the terminal that looks like:

Loaded <count> lcm message types from: <package name>

You have to make sure:

  1. you compiled your message types for python
  2. the message type python module is installed in a standard location or somewhere in your PYTHONPATH

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