This commit is contained in:
Javier Moreno
2018-11-02 11:57:07 +01:00
parent b483e7e007
commit 27203c273e
4 changed files with 51 additions and 8 deletions
+1 -1
View File
@@ -247,7 +247,7 @@ endif()
#Install
install(
FILES "${_DEFAULT_FASTRTPS_PROFILES_PATH}"
DESTINATION "../microxrcedds_agent/bin"
DESTINATION lib/${PROJECT_NAME}
)
+2 -2
View File
@@ -1,6 +1,6 @@
<participant profile_name="default_xrce_participant">
<participant profile_name="participant_profile">
<rtps>
<name>default_xrce_participant</name>
<name>participant_profile</name>
</rtps>
</participant>
<data_writer profile_name="shapetype_data_writer">
+29
View File
@@ -0,0 +1,29 @@
<topic profile_name="parameter_events_t">
<name>rt/parameter_events</name>
<dataType>rcl_interfaces::msg::dds_::ParameterEvent_</dataType>
</topic>
<topic profile_name="clock_t">
<name>rt/clock</name>
<dataType>rosgraph_msgs::msg::dds_::Clock_</dataType>
</topic>
<data_writer profile_name="parameter_events_p">
<topic>
<kind>NO_KEY</kind>
<name>rt/parameter_events</name>
<dataType>rcl_interfaces::msg::dds_::ParameterEvent_</dataType>
</topic>
</data_writer>
<data_reader profile_name="clock_s">
<topic>
<kind>NO_KEY</kind>
<name>rt/clock</name>
<dataType>rosgraph_msgs::msg::dds_::Clock_</dataType>
</topic>
</data_reader>
<data_reader profile_name="parameter_events_s">
<topic>
<kind>NO_KEY</kind>
<name>rt/parameter_events</name>
<dataType>rcl_interfaces::msg::dds_::ParameterEvent_</dataType>
</topic>
</data_reader>
+18 -4
View File
@@ -16,13 +16,18 @@
#ifdef _WIN32
#include <uxr/agent/transport/udp/UDPServerWindows.hpp>
#include <uxr/agent/transport/tcp/TCPServerWindows.hpp>
#else
#elif __unix__
#include <unistd.h>
#include <libgen.h>
#include <uxr/agent/transport/serial/SerialServerLinux.hpp>
#include <uxr/agent/transport/udp/UDPServerLinux.hpp>
#include <uxr/agent/transport/tcp/TCPServerLinux.hpp>
#include <termios.h>
#include <fcntl.h>
#endif //_WIN32
#endif
#include <iostream>
#include <string>
#include <limits>
@@ -84,9 +89,18 @@ private:
int main(int argc, char** argv)
{
#ifdef __unix__
char exe_path[200];
ssize_t count = readlink("/proc/self/exe", exe_path, sizeof(exe_path));
if (count != -1) {
chdir(dirname(exe_path));
}
#endif
bool initialized = false;
#ifndef _WIN32
#ifdef __unix__
if(argc == 2 && (strcmp(argv[1], "-h") == 0 || strcmp(argv[1], "--help") == 0))
{
showHelp();
@@ -218,7 +232,7 @@ int main(int argc, char** argv)
{
initializationError();
}
#else
#elif _WIN32
(void) argc;
(void) argv;