Problem with installing ROS on Matlab

5 Ansichten (letzte 30 Tage)
Jonas
Jonas am 27 Nov. 2023
Kommentiert: Jonas am 4 Dez. 2023
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

Akzeptierte Antwort

Josh Chen
Josh Chen am 27 Nov. 2023
Bearbeitet: Josh Chen am 27 Nov. 2023
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 Kommentar
Jonas
Jonas am 4 Dez. 2023
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

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Introduction to Installation and Licensing finden Sie in Help Center und File Exchange

Tags

Produkte


Version

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by