Skip to content

Commit bdfdad5

Browse files
committed
add a jump handler to trigger restarting the controller bridge when there is a jump backwards on the simulated clock.
1 parent da08656 commit bdfdad5

File tree

9 files changed

+270
-196
lines changed

9 files changed

+270
-196
lines changed

flowstate/aic_flowstate_ros_bridge/CMakeLists.txt

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,6 @@ target_link_libraries(${SERVICE_NAME}_main
8383
${SERVICE_NAME}_protos
8484
)
8585

86-
# Generate the manifest and default config binarypb files
87-
add_dependencies(${SERVICE_NAME}_main
88-
${SERVICE_NAME}_manifest
89-
${SERVICE_NAME}_default_config
90-
)
91-
9286
#===============================================================================
9387

9488
install(TARGETS
@@ -98,12 +92,10 @@ install(TARGETS
9892
DESTINATION lib/${PROJECT_NAME}
9993
)
10094

101-
# Install proto descriptor, manifest, and config files
95+
# Install proto descriptor file
10296
install(FILES
10397
${CMAKE_CURRENT_BINARY_DIR}/${SERVICE_NAME}_protos.desc
104-
${CMAKE_CURRENT_BINARY_DIR}/service_manifest.binarypb
105-
${CMAKE_CURRENT_BINARY_DIR}/default_config.binarypb
106-
DESTINATION share/${PROJECT_NAME}/${SERVICE_NAME}
98+
DESTINATION share/${PROJECT_NAME}
10799
)
108100

109101
install(DIRECTORY config proto launch

flowstate/aic_flowstate_ros_bridge/README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ cd ~/ws_aic
2424

2525
```bash
2626
# 1. Export path to side-loaded service bundle
27-
export SERVICE_BUNDLE=~/ws_aic/images/aic_flowstate_ros_bridge.bundle.tar
27+
export SERVICE_BUNDLE=~/ws_aic/images/aic_flowstate_ros_bridge/aic_flowstate_ros_bridge.bundle.tar
2828

2929
# 2. Add Organization
3030
export INTRINSIC_ORGANIZATION="<ORG_NAME>"
@@ -37,3 +37,12 @@ export INTRINSIC_CLUSTER="vmp-xxxx-xxxxxxx"
3737
--cluster $INTRINSIC_CLUSTER \
3838
$SERVICE_BUNDLE
3939
```
40+
41+
<!-- todo(johntgz) documentation -->
42+
## Interfaces
43+
44+
### Services
45+
46+
### Published Topics
47+
48+
### Subscribed Topics

flowstate/aic_flowstate_ros_bridge/aic_flowstate_ros_bridge.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ message RobotControlBridgeConfig {
99
string part_name = 3;
1010
string task_settings_file = 4;
1111
string joint_task_settings_file = 5;
12+
bool use_sim_time = 6;
1213
}
1314

1415
// Configuration to control which sensors are enabled to publish ROS 2 messages.

flowstate/aic_flowstate_ros_bridge/aic_flowstate_ros_bridge_default_config.pbtxt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,6 @@
3333
part_name: "arm"
3434
task_settings_file: "config/default_task_settings.pbtxt"
3535
joint_task_settings_file: "config/default_joint_task_settings.pbtxt"
36+
use_sim_time: true
3637
},
3738
}

flowstate/aic_flowstate_ros_bridge/launch/aic_flowstate_ros_bridge_launch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
# limitations under the License.
1414

1515
import os
16-
from ament_index_python.packages import get_package_share_directory
1716

1817
from launch import LaunchDescription
1918
from launch.actions import DeclareLaunchArgument
@@ -78,6 +77,7 @@ def generate_launch_description():
7877
output="screen",
7978
parameters=[
8079
{
80+
"use_sim_time": True,
8181
"autostart": True,
8282
"service_tunnel": LaunchConfiguration("service_tunnel"),
8383
"flowstate_zenoh_router_address": LaunchConfiguration(

flowstate/aic_flowstate_ros_bridge/src/aic_flowstate_ros_bridge_main.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ int main(int argc, char* argv[]) {
116116
robot_control_bridge_config.task_settings_file());
117117
params.emplace_back("joint_task_settings_file",
118118
robot_control_bridge_config.joint_task_settings_file());
119+
params.emplace_back("use_sim_time",
120+
robot_control_bridge_config.use_sim_time());
119121

120122
options.parameter_overrides(params);
121123

0 commit comments

Comments
 (0)