masasin / pyrosbag

Programmatically control ROS Bag files.
MIT License
13 stars 1 forks source link

bool object is not callable #3

Open mertmzk opened 7 years ago

mertmzk commented 7 years ago

Hi masasin,

Thanks for you effort but I got little problems with it. When I run your example code here the errors I am gettiing:

No handlers could be found for logger "bag_player" Traceback (most recent call last):

while example.is_running():
TypeError: 'bool' object is not callable

What might be reason causing that.

Thanks in advance.

mertmzk commented 7 years ago

Fixed!

Your example code needs to be modified while calling is_running function as:

while example.is_running: (without bracket)

Thanks.

ashokcool commented 7 years ago

Hi, Thank you for the help. But your solution leaves me into an unbreakable loop. The bag file keeps on playing and even a ctrl+C is not able to stop the rosbag from playing. Please help !!

Thanks !

masasin commented 7 years ago

@mertmzk, can you submit a pull request?

masasin commented 7 years ago

@ashokcool, I'll submit a patch later today. Let me know if it works.

The reason it didn't stop it is because we use subprocess to run rosbag on your system. However, when we except KeyboardInterrupt, we can just send an os.kill() to all open processes.