Problem with installing ROS on Matlab

조회 수: 5 (최근 30일)
Jonas
Jonas 2023년 11월 27일
댓글: Jonas 2023년 12월 4일
I'm trying to install a the ROS-Toolbox on Matlab for a Niryo NED 2 robot.
I followed the instructions on the documentation:
Tested it with CMake 3.19, Matlab 2022a and Matlab 2023b.
The log file describes a problem with Ninja install but I'm not sure how to fix it.
Do you know the problem eventually?
Here the process on Matlab:
>> folderpath = "C:\Ned2-Pakete\ned_ros"
folderpath =
"C:\Ned2-Pakete\ned_ros"
>> rosgenmsg(folderpath)
Identifying message files in folder 'C:/Ned2-Pakete/ned_ros'..Done.
Validating message files in folder 'C:/Ned2-Pakete/ned_ros'..Done.
[14/14] Generating MATLAB interfaces for custom message packages... Done.
Running catkin build in folder 'C:/Ned2-Pakete/ned_ros/matlab_msg_gen_ros1/win64'.
Build in progress. This may take several minutes...Error using ros.internal.ROSProjectBuilder/buildPackage
Error building package: build log.
Error in rosgenmsg (line 480)
buildPackage(builder, [], 'install', catkinMakeArgs); %other messages might need to be present in the same directory
>>
from the build log:
[141/146] Building CXX object niryo_robot_vision\CMakeFiles\niryo_robot_vision_matlab.dir\src\niryo_robot_vision_Visualization_service.cpp.obj C:\Program Files\MATLAB\R2022a\sys\ros1\win64\ros1\boost\include\boost-1_75\boost/bind.hpp(77): note: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace mwboost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior. [142/146] Building CXX object niryo_robot_vision\CMakeFiles\niryo_robot_vision_matlab.dir\src\niryo_robot_vision_ImageParameters_message.cpp.obj C:\Program Files\MATLAB\R2022a\sys\ros1\win64\ros1\boost\include\boost-1_75\boost/bind.hpp(77): note: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace mwboost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior. [143/146] Building CXX object niryo_robot_vision\CMakeFiles\niryo_robot_vision_matlab.dir\src\niryo_robot_vision_SetImageParameter_service.cpp.obj C:\Program Files\MATLAB\R2022a\sys\ros1\win64\ros1\boost\include\boost-1_75\boost/bind.hpp(77): note: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace mwboost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior. ninja: build stopped: subcommand failed. Base path: C:\Ned2-Pakete\ned_ros\matlab_msg_gen_ros1\win64 Source space: C:\Ned2-Pakete\ned_ros\matlab_msg_gen_ros1\win64\src Build space: C:\Ned2-Pakete\ned_ros\matlab_msg_gen_ros1\win64\build Devel space: C:\Ned2-Pakete\ned_ros\matlab_msg_gen_ros1\win64\devel Install space: C:\Ned2-Pakete\ned_ros\matlab_msg_gen_ros1\win64\install #### #### Running command: "ninja build.ninja" in "C:\Ned2-Pakete\ned_ros\matlab_msg_gen_ros1\win64\build" #### #### #### Running command: "ninja install install -j12 -l12" in "C:\Ned2-Pakete\ned_ros\matlab_msg_gen_ros1\win64\build" #### Invoking "ninja install install -j12 -l12" failed

채택된 답변

Josh Chen
Josh Chen 2023년 11월 27일
편집: Josh Chen 2023년 11월 27일
Hi Jonas,
It seems there is a redefined variable in niryo_robot_status/msg/RobotStauts.msg - REBOOT_MOTOR has been defined twice.
Unfortunately, this is not supported in ROS Toolbox. In general ROS, the new value would just override the old value. As so, please delete the prior definition (line 10) and try generating message in MATLAB with rosgenmsg(folderpath) again.
Let me know if you face any new issue.
Thanks,
Josh
  댓글 수: 1
Jonas
Jonas 2023년 12월 4일
Hi Josh,
thank you very much!
I also asked the Niryo-Support and they gave the same advice.
I deleted line 21 "int8 REBOOT_MOTOR=13" and it installed correctly.
Greetings
Jonas

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

태그

제품


릴리스

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by