ros / ros_comm

ROS communications-related packages, including core client libraries (roscpp, rospy, roslisp) and graph introspection tools (rostopic, rosnode, rosservice, rosparam).
http://wiki.ros.org/ros_comm
752 stars 913 forks source link

rosbag play formatting problems #419

Open trainman419 opened 10 years ago

trainman419 commented 10 years ago

I'm seeing two separate but related issues with the status line from rosbag play:

Waiting 0.2 seconds after advertising topics... done.

Hit space to toggle paused, or 's' to step.
hendrix@hendrix:~$ e: 946684965.239850   Duration: 2.102644 / 11856.071320     
dirk-thomas commented 10 years ago

The printing happens around here: https://github.com/ros/ros_comm/blob/81f12203e055371124ebfb71123368e91d5b069e/tools/rosbag/src/player.cpp#L266

In order to adapt the code should dynamically scale the right padding based on the width of the terminal. That way it can truncate it on narrow terminal and still overwrite trailing text on wide terminals. This would also require to handle the signal when the terminal width is changed.

Since we won't have time to work on this feature please consider providing a pull request for it.

trainman419 commented 10 years ago

Related: rosbag play doesn't appear to set the terminal flags back when it is done. I have to run stty sane before I can use sudo and vim properly.