microRTPS: add timesync for the agent side

This commit is contained in:
TSC21
2020-03-04 17:43:39 +00:00
committed by Nuno Marques
parent 152427ecdc
commit 170835f3f8
11 changed files with 331 additions and 7 deletions
+10
View File
@@ -416,6 +416,8 @@ def generate_agent(out_dir):
shutil.rmtree(os.path.join(out_dir, "fastrtpsgen"))
cp_wildcard(os.path.join(urtps_templates_dir,
"microRTPS_transport.*"), agent_out_dir)
cp_wildcard(os.path.join(urtps_templates_dir,
"microRTPS_timesync.*"), agent_out_dir)
if cmakelists:
os.rename(os.path.join(out_dir, "microRTPS_agent_CMakeLists.txt"),
os.path.join(out_dir, "CMakeLists.txt"))
@@ -457,6 +459,12 @@ def generate_client(out_dir):
if os.path.isfile(def_file):
os.rename(def_file, def_file.replace(".cpp", ".cpp_"))
def_file = os.path.join(default_client_out, "microRTPS_transport.h")
if os.path.isfile(def_file):
os.rename(def_file, def_file.replace(".cpp", ".cpp_"))
def_file = os.path.join(default_client_out, "microRTPS_timesync.cpp")
if os.path.isfile(def_file):
os.rename(def_file, def_file.replace(".cpp", ".cpp_"))
def_file = os.path.join(default_client_out, "microRTPS_timesync.h")
if os.path.isfile(def_file):
os.rename(def_file, def_file.replace(".h", ".h_"))
@@ -466,6 +474,8 @@ def generate_client(out_dir):
# Final steps to install client
cp_wildcard(os.path.join(urtps_templates_dir,
"microRTPS_transport.*"), out_dir)
cp_wildcard(os.path.join(urtps_templates_dir,
"microRTPS_timesync.*"), out_dir)
return 0
+3 -1
View File
@@ -177,8 +177,10 @@ rtps:
id: 76
- msg: test_motor
id: 77
- msg: timesync_status
- msg: timesync
id: 78
receive: true
send: true
- msg: trajectory_waypoint
id: 79
receive: true