Problem in building a model in simulink communicating with ROS

조회 수: 4 (최근 30일)
Andrea Paludo
Andrea Paludo 2022년 11월 11일
답변: Sugandhi 2023년 9월 22일
I'm trying to build a publisher in simulink/ROS in order to control the turtlebot3, I would like tu publish a sequence of command in simulink and then to move the turtlebot in Gazebo, on the virtual machine.
I alredy set the corret hardware implementation and the fixed step size in the settings, I enabled the simulation pacing.
Then in Ubuntu, on the virtual machine I opened gazebo to make the topics visible, but still I am not able to complete my task.
I made rosinit in matlab and checked for the ping between the virtual machine and windows.
When running the model after a certain time the following error is displayed:
CMake Error at /opt/ros/noetic/share/turtlebot3_gazebo/cmake/turtlebot3_gazeboConfig.cmake:113 (message): Project 'turtlebot3_gazebo' specifies '/usr/include/sdformat-9.8' as an include dir, which is not found. It does neither exist as an absolute directory nor in '${prefix}//usr/include/sdformat-9.8'. Check the issue tracker 'https://github.com/ROBOTIS-GIT/turtlebot3_simulations/issues' and consider creating a ticket if the problem has not been reported yet. Call Stack (most recent call first): /opt/ros/noetic/share/catkin/cmake/catkinConfig.cmake:76 (find_package) mw_vision_example/CMakeLists.txt:10 (find_package) -- Configuring incomplete, errors occurred! See also "/home/user/catkin_ws/build/CMakeFiles/CMakeOutput.log". See also "/home/user/catkin_ws/build/CMakeFiles/CMakeError.log". make: *** [Makefile:15272: cmake_check_build_system] Error 1 Base path: /home/user/catkin_ws Source space: /home/user/catkin_ws/src Build space: /home/user/catkin_ws/build Devel space: /home/user/catkin_ws/devel Install space: /home/user/catkin_ws/install #### #### Running command: "make cmake_check_build_system" in "/home/user/catkin_ws/build" #### Invoking "make cmake_check_build_system" failed
### Build procedure for AssignmentA1 aborted due to an error.
Build Summary
0 of 1 models built (1 models already up to date) Build duration: 0h 0m 56.457s
External Mode
Closing external mode connection to ROS target ''192.168.116.128''.
The following error occurred during deployment to your hardware board: Build unsuccessful for model 'AssignmentA1'. Check the build log in the diagnostics viewer for error messages.
Component:Simulink
How can I solve the problem? I am working in MATLAB/Simulink 2022a

답변 (1개)

Sugandhi
Sugandhi 2023년 9월 22일
Hi,
I understand that you were trying to build a ‘publisher’ in Simulink/ROS to control the ‘turtlebot3’. When running the model after a certain time you were getting error.
The error message says that there is an issue with the 'turtlebot3_gazebo' package in the ROS workspace. Specifically, it indicates that the include directory '/usr/include/sdformat-9.8' is not found.
Few possible workarounds could be:
  1. Make sure that you have installed all the necessary dependencies for the 'turtlebot3_gazebo' package. You can check the ‘package.xml’ file in the 'turtlebot3_gazebo' package to see the required dependencies. Install any missing dependencies using the package manager in your ROS distribution.
  2. It's possible that the 'turtlebot3_gazebo' package needs to be updated to work with the version of ROS you are using. Check if there are any updates available for the package and install them accordingly.
  3. Try rebuilding your ROS workspace to ensure that all packages are properly built and linked.
  4. Verify that the package paths are correctly set in your ROS environment.

카테고리

Help CenterFile Exchange에서 ROS Node Generation and Deployment에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by