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

Add rosconsole command to change logger levels from command line #576

Closed
wants to merge 7 commits into from

Conversation

cmansley
Copy link
Contributor

@cmansley cmansley commented Mar 5, 2015

There is only the rqt_logger_level command for changing the logger
level for node. If you are doing remote work without an X session, you
have to send service commands directly or change the logger
configuration. This command line tool allows you to query and set the
logger level.

There is only the rqt_logger_level command for changing the logger
level for node. If you are doing remote work without an X session, you
have to send service commands directly or change the logger
configuration. This command line tool allows you to query and set the
logger level.
@ros-pull-request-builder
Copy link
Member

Can one of the admins verify this patch?

@@ -121,3 +121,8 @@ if(CATKIN_ENABLE_TESTING)
target_link_libraries(${PROJECT_NAME}-thread_test ${PROJECT_NAME})
endif()
endif()

catkin_python_setup()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The package needs a setup.py file for this to work. You might have missed to add it to the repo.

@dirk-thomas
Copy link
Member

This is a great new feature.

I made a couple of small comments inline. The "biggest" suggestion would be to use argparse instead of custom argv handling. This will likely also automatically improve the usage information for users.

@cmansley
Copy link
Contributor Author

I fixed some of the copy and paste errors and I added the setup.py file. Thanks for the feedback.

With regards to argparse, I simply copied what exists in the other default ros command line tools. And at least on older systems, argparse is not part of the default python install.

@dirk-thomas
Copy link
Member

Actually nowadays it is part of it. Since this patch targets Indigo which implies Ubuntu Trusty which comes with Python 2.7 which includes argparse by default.

Anyway you don't have to use argparse - it was only meant as a suggestion. A lot of existing tools still use optparse.

packages=['rosconsole'],
package_dir={'': 'src'},
scripts=['scripts/rosconsole'],
requires=['genmsg', 'genpy', 'roslib', 'rospkg']
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please explain why you used these four dependencies?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I copied from all other default tools.

@dirk-thomas
Copy link
Member

Please make new Python code comply with PEP8.

Note: pep8 does allow an "increase the nominal line length from 80 to
100 characters"
@gerkey
Copy link
Contributor

gerkey commented Apr 2, 2015

Thanks for the contribution. I made a few small fixes and created #594 to replace this PR.

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

Successfully merging this pull request may close these issues.

None yet

4 participants