Skip to content
This repository has been archived by the owner on Dec 13, 2024. It is now read-only.

Make robot ip launch argument #327

Merged
merged 2 commits into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@


from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument
from launch.actions import IncludeLaunchDescription
from launch.substitutions import LaunchConfiguration
from launch_ros.actions import Node
from launch.substitutions import ThisLaunchFileDir
from launch.launch_description_sources import AnyLaunchDescriptionSource
Expand All @@ -44,13 +46,18 @@ def generate_launch_description():
hardware_config = system_config_parser.get_hardware_config()
controller_config = system_config_parser.get_ros2_control_config()

declare_robot_ip = DeclareLaunchArgument(
"robot_ip", description="IP address of the robot"
)
robot_ip = LaunchConfiguration("robot_ip")

dashboard_client_node = Node(
package="ur_robot_driver",
executable="dashboard_client",
name="dashboard_client",
output="both",
emulate_tty=True,
parameters=[{"robot_ip": hardware_config["ip"]}],
parameters=[{"robot_ip": robot_ip}],
)

protective_stop_manager_node = Node(
Expand All @@ -73,7 +80,7 @@ def generate_launch_description():
tool_comms_launch = IncludeLaunchDescription(
AnyLaunchDescriptionSource([ThisLaunchFileDir(), "/ur_tool_comms.launch.xml"]),
launch_arguments={
"robot_ip": hardware_config["ip"],
"robot_ip": robot_ip,
"tool_tcp_port": "54321",
"tool_device_name": "/tmp/ttyUR",
}.items(),
Expand Down
4 changes: 0 additions & 4 deletions src/picknik_ur_multi_arm_config/config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ hardware:
# [Optional, default=True]
launch_robot_state_publisher: True

# The robot's IP address.
# [Required]
ip: "0.0.0.0"

# Specify additional launch files for running the robot with real hardware.
# [Optional, defaults to a blank launch file if not specified]
robot_driver_persist_launch_file:
Expand Down
4 changes: 0 additions & 4 deletions src/picknik_ur_multi_arm_gazebo_config/config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ hardware:
# If the MoveIt Pro Agent should launch cameras when simulated.
launch_cameras_when_simulated: True

# The robot's IP address.
# [Required]
ip: "0.0.0.0"

# Specify any additional launch files for running the robot in simulation mode.
# Used when hardware.simulated is True.
# [Optional, defaults to a blank launch file if not specified]
Expand Down
Loading