ros2 / ros2/ros2cli

Cannot change log level on ros2 component load command (galactic)

Open
#699 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
262
Forks
228
Avg merge
23h 15m
Merged PRs (30d)
12

Description

Bug report

Required Info:

  • Operating System:
    Ubuntu 20.04
  • Installation type:
    binaries
  • Version or commit hash:
    galactic
  • DDS implementation:
    default
Steps to reproduce issue

Try to change log level on ros2 component load command

Expected behavior

Node loaded with requested log level

Actual behavior

Error from the command

Additional information

$ ros2 component load /ComponentManager camera camera::NodeFactory --log-level WARN
Traceback (most recent call last):
File "/opt/ros/galactic/bin/ros2", line 11, in
load_entry_point('ros2cli==0.13.1', 'console_scripts', 'ros2')()
File "/opt/ros/galactic/lib/python3.8/site-packages/ros2cli/cli.py", line 67, in main
rc = extension.main(parser=parser, args=args)
File "/opt/ros/galactic/lib/python3.8/site-packages/ros2component/command/component.py", line 37, in main
return extension.main(args=args)
File "/opt/ros/galactic/lib/python3.8/site-packages/ros2component/verb/load.py", line 49, in main
component_uid, component_name = load_component_into_container(
File "/opt/ros/galactic/lib/python3.8/site-packages/ros2component/api/init.py", line 257, in load_component_into_container
request.log_level = log_level
File "/opt/ros/galactic/lib/python3.8/site-packages/composition_interfaces/srv/_load_node.py", line 217, in log_level
assert
AssertionError: The 'log_level' field must be of type 'int'

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Inspect ros2component/verb/load.py and ros2component/api/init.py, following the ros2 component load entry point and the assignment to request.log_level. Reproduce the command in the issue, then verify that loading with --log-level WARN completes without the reported type assertion.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.