-
Notifications
You must be signed in to change notification settings - Fork 0
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 log_level #62
Merged
Add log_level #62
Changes from 20 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
d971c6c
Add log_level
23-yoshikawa 5651e90
fix
23-yoshikawa e93ec93
deleate_index,joystick_id
23-yoshikawa fbed0ed
joystick
23-yoshikawa 2cd1477
channel
23-yoshikawa 0217a4a
channel_launch
23-yoshikawa 087cc59
receiver
23-yoshikawa 2e8fcf6
sender
23-yoshikawa 4a42e2d
all_launch
23-yoshikawa 1f1dc31
depth
23-yoshikawa 4222348
imu
23-yoshikawa e22fc00
double_camera
23-yoshikawa d070eb2
double_imshow
23-yoshikawa 1c19419
double_led
23-yoshikawa bcdbd77
nucleo_channel
23-yoshikawa 422372c
pi_devices
23-yoshikawa 25185d6
fix
23-yoshikawa c7f9f0d
fix
23-yoshikawa 7f936ac
ruff check
23-yoshikawa 75d6769
fix
23-yoshikawa a7f5c46
add launch_configurations
23-yoshikawa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,33 @@ | ||
from typing import Any | ||
|
||
from launch import LaunchDescription | ||
from launch.actions import DeclareLaunchArgument | ||
from launch.substitutions import LaunchConfiguration | ||
from launch_ros.actions import Node | ||
|
||
|
||
def generate_launch_description(): | ||
return LaunchDescription( | ||
[ | ||
Node( | ||
package="joystick", | ||
executable="joystick", | ||
namespace="device", | ||
remappings=[("/device/joystick", "/packet/joystick")], | ||
), | ||
], | ||
def joystick_node(**kwargs: Any) -> Node: | ||
kwargs["package"] = "joystick" | ||
kwargs["executable"] = "joystick" | ||
kwargs["namespace"] = "device" | ||
return Node(**kwargs) | ||
|
||
|
||
def generate_launch_description() -> LaunchDescription: | ||
log_level_arg = DeclareLaunchArgument( | ||
"log_level", | ||
default_value="info", | ||
choices=["debug", "info", "warn", "error", "fatal"], | ||
description="Logging level for the nodes", | ||
) | ||
log_level = LaunchConfiguration("log_level") | ||
|
||
joystick = Node( | ||
package="joystick", | ||
executable="joystick", | ||
namespace="device", | ||
remappings=[("/device/joystick", "/packet/joystick")], | ||
ros_arguments=["--log-level", log_level], | ||
) | ||
|
||
return LaunchDescription([log_level_arg, joystick]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,22 @@ | ||
from launch import LaunchDescription | ||
from launch.actions import DeclareLaunchArgument | ||
from launch.substitutions import LaunchConfiguration | ||
from launch_ros.actions import Node | ||
|
||
|
||
def generate_launch_description() -> LaunchDescription: | ||
log_level_arg = DeclareLaunchArgument( | ||
"log_level", | ||
default_value="info", | ||
choices=["debug", "info", "warn", "error", "fatal"], | ||
description="Logging level for the nodes", | ||
) | ||
log_level = LaunchConfiguration("log_level") | ||
all_exec = Node( | ||
package="pi_i2c", | ||
executable="all", | ||
namespace="device", | ||
remappings=[("/device/imu", "/packet/sensors/imu")], | ||
ros_arguments=["--log-level", log_level], | ||
) | ||
return LaunchDescription([all_exec]) | ||
return LaunchDescription([log_level_arg, all_exec]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,21 @@ | ||
from launch import LaunchDescription | ||
from launch.actions import DeclareLaunchArgument | ||
from launch.substitutions import LaunchConfiguration | ||
from launch_ros.actions import Node | ||
|
||
|
||
def generate_launch_description() -> LaunchDescription: | ||
log_level_arg = DeclareLaunchArgument( | ||
"log_level", | ||
default_value="info", | ||
choices=["debug", "info", "warn", "error", "fatal"], | ||
description="Logging level for the nodes", | ||
) | ||
log_level = LaunchConfiguration("log_level") | ||
depth = Node( | ||
package="pi_i2c", | ||
executable="depth", | ||
namespace="device", | ||
ros_arguments=["--log-level", log_level], | ||
) | ||
return LaunchDescription([depth]) | ||
return LaunchDescription([log_level_arg, depth]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,22 @@ | ||
from launch import LaunchDescription | ||
from launch.actions import DeclareLaunchArgument | ||
from launch.substitutions import LaunchConfiguration | ||
from launch_ros.actions import Node | ||
|
||
|
||
def generate_launch_description() -> LaunchDescription: | ||
log_level_arg = DeclareLaunchArgument( | ||
"log_level", | ||
default_value="info", | ||
choices=["debug", "info", "warn", "error", "fatal"], | ||
description="Logging level for the nodes", | ||
) | ||
log_level = LaunchConfiguration("log_level") | ||
imu = Node( | ||
package="pi_i2c", | ||
executable="imu", | ||
namespace="device", | ||
remappings=[("/device/imu", "/packet/sensors/imu")], | ||
ros_arguments=["--log-level", log_level], | ||
) | ||
return LaunchDescription([imu]) | ||
return LaunchDescription([log_level_arg, imu]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,33 @@ | ||
from launch import LaunchDescription | ||
from launch.actions import GroupAction, IncludeLaunchDescription | ||
from launch.actions import DeclareLaunchArgument, GroupAction, IncludeLaunchDescription | ||
from launch.launch_description_sources import PythonLaunchDescriptionSource | ||
from launch.substitutions import PathJoinSubstitution | ||
from launch.substitutions import LaunchConfiguration, PathJoinSubstitution | ||
from launch_ros.substitutions import FindPackageShare | ||
|
||
|
||
def generate_launch_description() -> LaunchDescription: | ||
log_level_arg = DeclareLaunchArgument( | ||
"log_level", | ||
default_value="info", | ||
choices=["debug", "info", "warn", "error", "fatal"], | ||
description="Logging level for the nodes", | ||
) | ||
log_level = LaunchConfiguration("log_level") | ||
camera0 = IncludeLaunchDescription( | ||
PythonLaunchDescriptionSource( | ||
PathJoinSubstitution( | ||
[FindPackageShare("camera_reader"), "launch", "camera_reader_launch.py"] | ||
) | ||
), | ||
launch_arguments=[("index", "0")], | ||
launch_arguments=[("index", "0"), ("log_level", log_level)], | ||
) | ||
camera1 = IncludeLaunchDescription( | ||
PythonLaunchDescriptionSource( | ||
PathJoinSubstitution( | ||
[FindPackageShare("camera_reader"), "launch", "camera_reader_launch.py"] | ||
) | ||
), | ||
launch_arguments=[("index", "1")], | ||
launch_arguments=[("index", "1"), ("log_level", log_level)], | ||
) | ||
cameras = GroupAction([camera0, camera1], forwarding=False) | ||
return LaunchDescription([cameras]) | ||
return LaunchDescription([log_level_arg, cameras]) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
やっぱりこれだけだと通りません
launch_configurations
を設定する必要があります、記述例↓2024_umiusi/ul/launch/simple_joy_app_pc.py
Line 41 in fb19c0a
他の
IncludeLaunchDescription
を使っているところもこれをやる必要があるんですが、GroupAction
の引数に設定する必要があるので気をつけてください