Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature] "go to definition" for ROS messages #1301

Open
kst179 opened this issue Nov 11, 2024 · 0 comments
Open

[feature] "go to definition" for ROS messages #1301

kst179 opened this issue Nov 11, 2024 · 0 comments
Labels
feature request Suggested features

Comments

@kst179
Copy link

kst179 commented Nov 11, 2024

what is needed
Support "go to definition" button for ROS messages. Should work similarly to language ones: in any *.msg file it should be triggered by either

  • RMB (context menu) on message attribute type -> Go to Definition, or
  • F12 with cursor on the type, or
  • Ctrl+LMB on type
    Then file with message of specified type should open (if type is another message, and not primitive one). It would be nice if extension could work with both custom and standard ROS messages correctly scanning for them in project.

Bonus feature: make the same button but for the C++/Python code (context menu -> "Go to message definition") that is accessible if current type is a generated ROS message.

why is it needed
It allows developers to navigate quickly between ROS messages edit them and remind structure of complex custom messages.


Example

/// src/node.cpp
custom_msgs::MyMessage msg; // F12 or ctrl+click on "MyMessage"...

... opens this file

### src/custom_msgs/msg/MyMessage.msg
std_msgs/Header header # F12 or ctrl+click on "Header"...
...

... jumps to file:

### /opt/ros/melodic/share/std_msgs/msg/Header.msg
# Standard metadata for higher-level stamped data types.
# This is generally used to communicate timestamped data 
# in a particular coordinate frame.
# 
# sequence ID: consecutively increasing ID 
uint32 seq
#Two-integer timestamp that is expressed as:
# * stamp.sec: seconds (stamp_secs) since epoch (in Python the variable is called 'secs')
# * stamp.nsec: nanoseconds since stamp_secs (in Python the variable is called 'nsecs')
# time-handling sugar is provided by the client library
time stamp
#Frame this data is associated with
string frame_id
@kst179 kst179 added the feature request Suggested features label Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Suggested features
Projects
None yet
Development

No branches or pull requests

1 participant