Skip to content

Commit da08656

Browse files
committed
Add launch file for local testing
1 parent 7b61c14 commit da08656

File tree

3 files changed

+122
-4
lines changed

3 files changed

+122
-4
lines changed

flowstate/aic_flowstate_ros_bridge/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,13 @@ install(FILES
106106
DESTINATION share/${PROJECT_NAME}/${SERVICE_NAME}
107107
)
108108

109-
install(DIRECTORY config proto
109+
install(DIRECTORY config proto launch
110110
DESTINATION share/${PROJECT_NAME}
111111
)
112112

113113
install(PROGRAMS
114114
scripts/test_robot_control_bridge.py
115+
scripts/mock_pub.py
115116
DESTINATION lib/${PROJECT_NAME}
116117
)
117118

flowstate/aic_flowstate_ros_bridge/aic_flowstate_ros_bridge.proto

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@ message SensorPublisherConfig {
1818
bool enable_force_torque_topic = 2;
1919
string robot_joint_state_topic = 3;
2020
string force_torque_topic = 4;
21-
string force_torque_sensor_frame_id = 5;
22-
string robot_controller_instance = 6;
23-
bool throttle_robot_state_topic = 7;
21+
string robot_base_frame_id = 5;
22+
string force_torque_sensor_frame_id = 6;
23+
string robot_controller_instance = 7;
24+
bool throttle_robot_state_topic = 8;
2425
}
2526

2627
message FlowstateRosBridgeConfig {
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
# Copyright 2025 Intrinsic Innovation LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
import os
16+
from ament_index_python.packages import get_package_share_directory
17+
18+
from launch import LaunchDescription
19+
from launch.actions import DeclareLaunchArgument
20+
from launch.substitutions import LaunchConfiguration
21+
from launch_ros.actions import LifecycleNode
22+
23+
24+
def generate_launch_description():
25+
return LaunchDescription(
26+
[
27+
DeclareLaunchArgument(
28+
"service_tunnel",
29+
default_value="localhost:17080",
30+
description="Service tunnel address",
31+
),
32+
DeclareLaunchArgument(
33+
"flowstate_zenoh_router_address",
34+
default_value="tcp/localhost:17447",
35+
description="Flowstate Zenoh router address",
36+
),
37+
DeclareLaunchArgument(
38+
"autostart",
39+
default_value="true",
40+
description="Automatically start the bridge",
41+
),
42+
DeclareLaunchArgument(
43+
"server_address",
44+
default_value="localhost:17080",
45+
description="Address of the robot controller application layer server",
46+
),
47+
DeclareLaunchArgument(
48+
"instance",
49+
default_value="robot_controller",
50+
description="Name of the robot controller service/resource instance",
51+
),
52+
DeclareLaunchArgument(
53+
"part_name", default_value="arm", description="Part to control"
54+
),
55+
DeclareLaunchArgument(
56+
"robot_joint_state_topic", default_value="/joint_states", description=""
57+
),
58+
DeclareLaunchArgument(
59+
"force_torque_topic",
60+
default_value="/fts_broadcaster/wrench",
61+
description="",
62+
),
63+
DeclareLaunchArgument(
64+
"robot_base_frame_id",
65+
default_value="robot/robot/base_link",
66+
description="",
67+
),
68+
DeclareLaunchArgument(
69+
"force_torque_sensor_frame_id",
70+
default_value="force_torque_sensor/force_torque_sensor/AtiForceTorqueSensor",
71+
description="",
72+
),
73+
LifecycleNode(
74+
package="flowstate_ros_bridge",
75+
executable="flowstate_ros_bridge",
76+
name="flowstate_ros_bridge",
77+
namespace="",
78+
output="screen",
79+
parameters=[
80+
{
81+
"autostart": True,
82+
"service_tunnel": LaunchConfiguration("service_tunnel"),
83+
"flowstate_zenoh_router_address": LaunchConfiguration(
84+
"flowstate_zenoh_router_address"
85+
),
86+
"bridge_plugins": [
87+
"flowstate_ros_bridge::ExecutiveBridge",
88+
"flowstate_ros_bridge::WorldBridge",
89+
"flowstate_ros_bridge::RobotControlBridge",
90+
],
91+
"server_address": LaunchConfiguration("server_address"),
92+
"instance": LaunchConfiguration("instance"),
93+
"part_name": LaunchConfiguration("part_name"),
94+
"robot_joint_state_topic": LaunchConfiguration(
95+
"robot_joint_state_topic"
96+
),
97+
"force_torque_topic": LaunchConfiguration("force_torque_topic"),
98+
"robot_base_frame_id": LaunchConfiguration(
99+
"robot_base_frame_id"
100+
),
101+
"force_torque_sensor_frame_id": LaunchConfiguration(
102+
"force_torque_sensor_frame_id"
103+
),
104+
"task_settings_file": os.path.join(
105+
"config",
106+
"default_task_settings.pbtxt",
107+
),
108+
"joint_task_settings_file": os.path.join(
109+
"config",
110+
"default_joint_task_settings.pbtxt",
111+
),
112+
}
113+
],
114+
),
115+
]
116+
)

0 commit comments

Comments
 (0)