Ask Your Question
0

how can I use sensor_msgs/BatteryState

asked 2017-07-10 08:04:45 -0600

emna gravatar image

I have to Display values of : voltage current charge and capacity of my turtlebot (kobuki) in real time. Can you help me please

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-07-10 08:50:26 -0600

You can write a simple suscriber ( you can follow this tutorial ) that will suscribe to your battery state topic.

In the callback function you can access and display the voltage (for example) using msg->voltage . All the parameters you can access to are available here .

edit flag offensive delete link more

Comments

thank you for your reply..Can you send me the Corresponding code with python, please...And how can I modify the code to subscribe to the topic using kobuki_msgs..what is the name of the topic?

emna gravatar imageemna ( 2017-07-10 09:03:28 -0600 )edit

You will find how to write a simple suscriber in python here. I don't know the name of your topic but I am pretty sure you can find it using the rostopic list command when your robot is awake.

jeanpolochon gravatar imagejeanpolochon ( 2017-07-10 09:22:36 -0600 )edit

Does it solve your problem ? If yes please accept the answer so others can also benefit

jeanpolochon gravatar imagejeanpolochon ( 2017-07-11 04:29:48 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-07-10 08:04:45 -0600

Seen: 586 times

Last updated: Jul 10 '17