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

Commit

Permalink
Make robot IP launch argument (#327)
Browse files Browse the repository at this point in the history
* Propagate hardware IP as launch argument

* Remove other instances of deprecated IP param
  • Loading branch information
dyackzan authored Aug 5, 2024
1 parent 4b596bd commit cef07c4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
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

0 comments on commit cef07c4

Please sign in to comment.