Conflict when generated ROS node using geometry_m​sgs/Vector​3Stamped

조회 수: 2 (최근 30일)
Iftach Naftaly
Iftach Naftaly 2021년 5월 27일
댓글: Iftach Naftaly 2021년 5월 27일
Hi all,
I use Matlab 2020b on ubuntu 18.04, I came across conflict in the code generation when trying to generate ROS node with geometry_msgs/Vector3Stamped.
When using Vector3Stamped there is an element in the bus assignment block called Vector, which cause a conflict when trying to generate the node.
My solution was to edit the name under the Bus Editor in the Modeling tab, generate the code and then change back the bus element in slros_busmsg_conversion.cpp, this solution works but it's a bit slow to change it each time I'm generating nodes (because the changes are not saved).
Is there a better solution to this problem?

답변 (1개)

Abhijeet Gadkari
Abhijeet Gadkari 2021년 5월 27일
Hello Iftach,
This looks like a bug in ROS Toolbox. Thanks for bringing this to our attention.
There are couple of options to get around this problem:
  1. If possible update your MATLAB to latest release, R2021a. This issue is resolved in R2021a.
  2. You can use geometry_msgs/PointStamped message to replace geometry_msgs/Vector3Stamped message. geometry_msgs/Point is one-to-one replacement for geometry_msgs/Vector3 message. Additionallly, you can apply translation to a point but not a vector3, since vector3 is just a direction. As mentioned in this post tf2 will ony rotate a geometry_msgs/Vector3 but it can rotate and translate a geometry_msgs/Point.
Let us know if this is an acceptable solution.
-Abhijeet
  댓글 수: 1
Iftach Naftaly
Iftach Naftaly 2021년 5월 27일
Hi Abhijeet,
Thanks for the answer.
I'm plan to migrate to R2021b so currently I'll stay with R2020b.
I'm using MAVROS's acceleration setpoint, which accecpt the Vector3Stamped and I don't know if it will be possible to use the PointStamped.
is there any other way to solve this conflict?
Thanks again,
Iftach.

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

카테고리

Help CenterFile Exchange에서 Specialized Messages에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by