필터 지우기
필터 지우기

Generated ROS node from Simulink, does not work on the target ROS device when launching it manually from Linux terminal without Simulink

조회 수: 2 (최근 30일)
Dear Mathworks Community,
I am using Simulink R2020a. I have designed a Simulink model that I wanted to be deployed and run on a ROS device. I am using the virtual machine, provided by Mathworks, that come preconfigured with ROS.
when using the first method,build and run directly from simulink, automatically the ROS node is generated succesfully and the real robot achieve the desired motion accordingly.
When using the second method of deployment, generate the node from simulink then transfer the tgz file to the ROS device and built it there to become an executable package, the robot does not move after the running the node from the linux terminal. The node generated from Simulink was built successfully on the ROS device. Even though when I run the node, no errors popup and I can see the name of the node when typing rosnode list, and I can also visuliaze it in the ROS graph in rqt . This means that the node is actually active, but why the robot does not move at all like the first method ?
the name of the node generated from simulink is "robot_test", to run the node directly from the ROS device, I type in the linux terminal :
rosrun robot_test robot_test_node.
I highly appreciate your help and thank you in advance
  댓글 수: 3
JF
JF 2022년 5월 12일
Thanks for the response, how can I reach the MathWorks Technical support team as requested ?

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

답변 (1개)

Josh Chen
Josh Chen 2022년 11월 7일
Hi JF,
Other quick things to try are:
1. Check whether the Gazebo world has been reset or not. Sometimes you may need to reset Gazebo. You can do this by Ctrl+R or click Edit > Reset World.
2. Run the following command on a new terminal on Linux and check whether expected messages has been published. Replace <topic-name> by the topic the generated node is publishing to (may also worth checking whether Gazebo is publishing any message).
$ source /opt/ros/noetic/setup.bash
$ rostopic echo <topic-name>
Please also forward this information when you reach out to MathWorks Techncial Support.
Thanks,
Josh

카테고리

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

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by