How to change data type from LaserScan Msg with ROS Read scan block
1 次查看(过去 30 天)
显示 更早的评论
Hello, I am trying to creat the simulink model to Run with Gazebo using ROS. When its come to the Scan data I struggled with connect Read scan data from ROS Laserscan Msg. I want to connect these Msg to the VFH block as shown in Pictures. I had try this method before with Gazebo block and its run perfectly. However, when I want to use ROS Msg I cannot change data type to be "Double" from Read Scan Msg "Single" type.
Can anyone suggest me the way to correct this type or How can I use other block or something
The one that I run with Gazebo is be like this. This one I am using the Read Lidar scan
Thank you so much in advance.
0 个评论
采纳的回答
Suresh Maddina
2023-10-27
编辑:Suresh Maddina
2023-10-27
Hi, It is my understanding that you are trying to provide the Ranges, Angles of "single" data type, and TargetDir of "double" data type to "Vector Field Histogram" block.
All the inputs to" Vector Field Histogram" block are expected to be of the same data type. Either convert the TargetDir to single data type, or convert Ranges, Angles to double data type.
You can use Data Type conversion block to convert from double to single or vice-versa (Convert input signal to specified data type - Simulink - MathWorks)
更多回答(0 个)
另请参阅
类别
在 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!