Failure to create ros2 publisher: too many input arguments
31 次查看(过去 30 天)
显示 更早的评论
Hi all
I'm having trouble creating a ros2 publisher (ROS2 Humble, Matlab 2024b), and feel like I'm going crazy. I'm trying to reuse some old code, which I believed was working. Now, however, it fails at the second step: creating the publisher. I've stripped down my script completely, and believe it matches the syntax in the documentation:
p3pNode = ros2node('p3p_node', 2);
p3pPub = ros2publisher(p3pNode,"/p3p","geometry_msgs/Pose");
When I run this, I get the error below:
Error using ros2publisher
Too many input arguments
The node is created successfully, and /geometry_msgs/Pose is a defined message type. What am i doing wrong?
4 个评论
回答(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!