Ask Your Question
0

if the required message is a standard message type available with ROS, do we still need to define it in msg/xxxx.msg?

asked 2020-10-30 11:13:50 -0500

Anirudh_Vajpeyi gravatar image

If my message type is geometry_msgs/WrenchStamped, do I still need to define it in msg folder or I can skip it? As I am not using a custom message type.

Thanks Anirudh

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2020-10-30 11:24:46 -0500

You can skip it. All standard message types are already run through gencpp/genpy/gennodejs/etc. during build time of the ROS distribution packages to generate the c++, python, and node.js message definition classes. You can verify this using locate on your machine:

> locate WrenchStamped
/opt/ros/melodic/include/geometry_msgs/WrenchStamped.h
/opt/ros/melodic/lib/python2.7/dist-packages/geometry_msgs/msg/_WrenchStamped.py
/opt/ros/melodic/lib/python2.7/dist-packages/geometry_msgs/msg/_WrenchStamped.pyc
/opt/ros/melodic/share/common-lisp/ros/geometry_msgs/msg/WrenchStamped.lisp
/opt/ros/melodic/share/common-lisp/ros/geometry_msgs/msg/_package_WrenchStamped.lisp
/opt/ros/melodic/share/gennodejs/ros/geometry_msgs/msg/WrenchStamped.js
/opt/ros/melodic/share/geometry_msgs/msg/WrenchStamped.msg
/opt/ros/melodic/share/roseus/ros/geometry_msgs/msg/WrenchStamped.l
/opt/ros/melodic/share/rviz/icons/classes/WrenchStamped.png
edit flag offensive delete link more
1

answered 2020-10-30 11:21:11 -0500

JackB gravatar image

A standard message type does not need to be defined in the msg folder. Only custom messages need to be defined there.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2020-10-30 11:13:50 -0500

Seen: 79 times

Last updated: Oct 30 '20