Mavlink Blocks, ROS Blocks When different tool chains are required
5 次查看(过去 30 天)
显示 更早的评论
I configured the Simulink Block as shown below. To briefly summarize, PX4 transmits Way Point information to Jetson (Serial).![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1576637/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1576637/image.png)
Velodyne Lidar is connected to ROS, and velodyne_points are received through ROS Block.
Currently, using each file, the Lidar Point Cloud data stream through ROS on one side and the PX4 coordinate information acquisition function on the other side have been successfully built in Jetson and are operating correctly.
However, a problem occurred here. I wanted to configure an avoidance algorithm using Lidar's Point Cloud, so I configured it as shown in the picture above, but an error occurred. Even if the target device is Jetson or ROS, it does not build. In addition, even if you change the toolchain, the build does not occur.
This is because the required toolchain and target device are different.
The error below occurs when the target device is ROS and the toolchain is catkin.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1576642/image.png)
It seems to occur in places related to Mavlink. No matter what combination you use, an error occurs when building.
What should I do when I need different Target Devices and Toolchains?
If there is a good way to stream point clouds even if it is not the above method, please explain it easily.
I want to link Jetson, PX4, IP Camera, and Lidar. In the case of webinars, there are no actual examples, so it is not easy to follow or does not have the same structure as above.
In most cases, data is received through a UDP receiver. When receiving data using a UDP receiver, all data from the point cloud could not be received due to buffer limitations. If you have any good examples, please let me know.
0 个评论
回答(1 个)
akshatsood
2024-1-8
编辑:akshatsood
2024-1-8
I understand that you are attempting to build an obstacle avoidance algorithm that involves integrating a system that includes PX4 for waypoint information, a Velodyne Lidar connected to ROS for point cloud data, and a Jetson device. It is apparent from the screenshot attached that build logs point out absence of the header file "mavlink_types.h".
Here are some possible workarounds to troubleshoot the root cause and address it.
Verifying Dependencies
Ensure that all required dependencies for your project are installed on the Jetson. This includes the appropriate versions of ROS, MAVROS (for interfacing with PX4), and any other libraries your avoidance algorithm depends on.
Consistent Toolchain
When building software for ROS, you should use "catkin_make" or "catkin build" as your build system. Ensure that your entire project is set up to use the same build system and that your "CMakeLists.txt" and "package.xml" files are correctly configured.
CMakeLists: https://cmake.org/cmake/help/book/mastering-cmake/chapter/Writing%20CMakeLists%20Files.html
MAVLink Issues
If the error is related to MAVLink, you might need to regenerate the MAVLink headers for your specific version of PX4. Please refer to the references attached to generate the headers and ensure they are correctly included in your build.
For additional debugging, you can leverage "roslaunch" command with the "--screen" flag to see the output of all nodes to perform node debugging.
Buffer Limitations in UDP
To combat the buffer issue, you can either attempt increasing the size of the UDP buffer on the operating system (if possible) or opt for a different communication protocol that is more suitable for large data streams, such as TCP or a faster serialization method like protobufs if latency is not a critical issue.
ROS and Point Cloud Streaming
As you are looking for streaming point cloud data, to my knowledge, you can use the PointCloud2 message type in ROS. You can subscribe to these messages in your ROS node and process them as needed. Please go through the following reference for a better understanding
I hope this helps.
2 个评论
akshatsood
2024-1-9
编辑:akshatsood
2024-1-9
Based on my understanding of the above comment, when you attempt to build a ROS block with the Mavlink block using the ROS build system, you are encountering an error. This indicates that the issue arises from the integration of the two blocks within the ROS build environment.
As a first step, could you please validate the compatibility of ROS and MAVLink. This page might help you for that: https://wiki.ros.org/mavlink
Further, did you try regenerating the MAVLink headers as the build log attached had raised a concern with the header file "mavlink_types.h". You should ensure that the header files are correctly included during the build.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Specialized Messages 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!