File tree Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change 7
7
* @date 2019-05-22
8
8
*/
9
9
10
+ // / Standard includes
10
11
#include < deque>
11
12
#include < atomic>
12
13
#include < fstream>
13
14
#include < chrono>
14
15
#include < thread>
15
16
17
+ // / ROS2 includes
18
+ #include < rclcpp/executor.hpp>
19
+
20
+ // / Dynamic Bridge include
16
21
#include " dynamic_graph_bridge/ros.hpp"
17
22
23
+ #ifdef __APPLE__
24
+ #include < mach-o/dyld.h>
25
+ #include < sys/param.h>
26
+ #endif
27
+
18
28
namespace dynamic_graph_bridge
19
29
{
20
30
/*
@@ -49,7 +59,7 @@ static GlobalListOfRosNodeType GLOBAL_LIST_OF_ROS_NODE;
49
59
class Executor
50
60
{
51
61
public:
52
- Executor () : ros_executor_(rclcpp::executor::ExecutorArgs (), 4 )
62
+ Executor () : ros_executor_(rclcpp::ExecutorOptions (), 4 )
53
63
{
54
64
is_thread_running_ = false ;
55
65
is_spinning_ = false ;
@@ -189,7 +199,7 @@ ExecutorPtr EXECUTOR = nullptr;
189
199
/* *
190
200
* @brief Private function that allow us to get the current executable name.
191
201
*
192
- * @return std::string the current executable name.
202
+ * @Return std::string the current executable name.
193
203
*/
194
204
std::string executable_name ()
195
205
{
@@ -206,6 +216,11 @@ std::string executable_name()
206
216
GetModuleFileNameA (nullptr , buf, MAX_PATH);
207
217
return buf;
208
218
219
+ #elif defined(__APPLE__)
220
+ uint32_t buf_length=MAXPATHLEN;
221
+ char buf[MAXPATHLEN];
222
+ _NSGetExecutablePath (buf,&buf_length);
223
+ return buf;
209
224
#else
210
225
211
226
static_assert (false , " unrecognized platform" );
You can’t perform that action at this time.
0 commit comments