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

jsk_network_tools cant directly support sensor_msgs/Image type #1496

Open
cretaceous-creature opened this issue Dec 8, 2016 · 5 comments
Open
Assignees

Comments

@cretaceous-creature
Copy link

@furushchev
If I change the param of '~message' directly to sensor_msgs/Image
it wont work due to the string parse failure.

Traceback (most recent call last):
  File "/home/ubuntu/ros/indigo/src/jsk_common/jsk_network_tools/scripts/silverhammer_lowspeed_streamer.py", line 118, in <module>
    st = SilverHammerLowspeedStreamer()
  File "/home/ubuntu/ros/indigo/src/jsk_common/jsk_network_tools/scripts/silverhammer_lowspeed_streamer.py", line 47, in __init__
    self.send_format = msgToStructFormat(self.send_message())
  File "/home/ubuntu/ros/indigo/src/jsk_common/jsk_network_tools/src/jsk_network_tools/silverhammer_util.py", line 53, in msgToStructFormat
    raise Excception("string is not supported!, please use char[static_length]")
NameError: global name 'Excception' is not defined

I also tested
sensor_msgs/Joy (fail)
sensor_msgs/Imu (success)
std_msgs/* (seem to be OK)

my temporary solution is that I create my own msg type under jsk_network_tools package,
in that way it will work for both type of sensor_msgs/Image and sensor_msgs/Joy...

@mmurooka
Copy link
Member

mmurooka commented Dec 8, 2016

Following is an example of silverhammer use case.
We also generate the original message for lowspeed_streamer.

launch
https://github.com/jsk-ros-pkg/jsk_demos/blob/master/jsk_2015_06_hrp_drc/drc_com_common/launch/field_computer_com.launch#L50-L58

msg
https://github.com/jsk-ros-pkg/jsk_demos/blob/master/jsk_2015_06_hrp_drc/drc_com_common/msg/FC2OCSSmall.msg

my temporary solution is that I create my own msg type under jsk_network_tools package,
in that way it will work for both type of sensor_msgs/Image and sensor_msgs/Joy...

If the message is general, it should be put under jsk_network_tools.
In DRC, we put message under drc package because it is specific to drc.

In highspeed, we can use any topic.

@cretaceous-creature
Copy link
Author

@mmurooka Thx,
The reason that I dont want to use the generated msg is that I dont want to
copy the data and make a new msg due to the weakness CPU of nvidia TK1 and TX1.
But it seems I have to resize the image anyway, so the generated msg is OK for me...

As you said, it seems lowspeed did not support all msgs types..

@mmurooka
Copy link
Member

mmurooka commented Dec 8, 2016

I see.
Is communication narrow? How about using highspeed?

@cretaceous-creature
Copy link
Author

@mmurooka Thx,
I am using highspeed and it is working now...
Sending an uncompressed mono color image at 10HZ
seems OK, but it still take 3.2MB network.
I may need to resize the image.

@furushchev
Copy link
Member

furushchev commented Dec 8, 2016 via email

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

4 participants