Robotics StackExchange | Archived questions

Using ROSTopicBandwidth.print_bw()

I seem to have some confusion on how to use ROSTopicBandwidth: this is the following code I used

import rostopic

topic = '/absodom'

bandwidth = rostopic.ROSTopicBandwidth(topic)

bandwidth.print_bw()

the last line of code that should print my bandwidth returns None

When I am running my rosbag and type rostopic bw /absodom in the terminal, I can get this number to display, seemingly accurately.

Am I using my print_bw() function incorrectly? I read the API:

http://docs.ros.org/kinetic/api/rostopic/html/rostopic-pysrc.html#ROSTopicBandwidth.print_bw

and I think i am doing this correctly.

the type on my bandwidth variable is a rostopic.ROSTopicBandwidth object so I think I initiated it correctly if nothing else.

Asked by kingkevlar on 2017-03-10 21:59:50 UTC

Comments

Answers