The problem I have here is that with ROS2, the robot interface fails to load the librobotinterface2, since it looks for librobotinterface2_ros.so, while the library is called librobotinterface2_ros2.so (so Cartesio run in the "visual_only" mode)
For now I have solved with std::string robot_type = "ros2"; which I imagine would cause the dual problem with ROS1.
|
std::string robot_type = "ros"; |
|
|
|
opt.get_parameter("robot_type", robot_type); |
|
|
|
bool ignore_type_from_env = false; |
|
|
|
opt.get_parameter("ignore_type_from_env", ignore_type_from_env); |
|
|
|
const char * robot_type_env = getenv("XBOT2IFC_ROBOT_TYPE"); |
|
|
|
if(robot_type_env && !ignore_type_from_env) |
|
{ |
|
robot_type = robot_type_env; |
|
} |
|
|
|
auto rob = CallFunction<RobotInterface*>( |
|
"librobotinterface2_" + robot_type + ".so", |
|
"xbot2_create_robot_plugin_" + robot_type, |
|
std::move(mdl) |
|
); |
I do not know which is the exact intention, and if an external arg is necessary, since in the ros2 folder the cpp/hpp are called robotinterface2_ros (without the 2 suffix), but then in the cmake the name is robotinterface2_ros2
@alaurenzi
The problem I have here is that with ROS2, the robot interface fails to load the
librobotinterface2, since it looks forlibrobotinterface2_ros.so, while the library is calledlibrobotinterface2_ros2.so(so Cartesio run in the "visual_only" mode)For now I have solved with
std::string robot_type = "ros2";which I imagine would cause the dual problem with ROS1.xbot2_interface/src/robotinterface2.cpp
Lines 39 to 58 in 80754b0
I do not know which is the exact intention, and if an external arg is necessary, since in the ros2 folder the cpp/hpp are called
robotinterface2_ros(without the 2 suffix), but then in the cmake the name is robotinterface2_ros2@alaurenzi