ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

Finding the location of a ROS node

asked 2020-07-29 15:21:13 -0500

sisko gravatar image

updated 2022-02-13 17:02:36 -0500

lucasw gravatar image

As part of my ROS re-education, I have been experimenting with the TurtleSim. I understand that the following command:

rosrun turtlesim turtlesim_node

..means execute turtlesim_node located in the turtlesim package. But I execute roscd turtlesim and listing the contents of that package, I can't locate the turtlesim node. The tree structure is shown below:

/opt/ros/melodic/share/turtlesim$ tree
.
├── cmake
│   ├── turtlesimConfig.cmake
│   ├── turtlesimConfig-version.cmake
│   ├── turtlesim-msg-extras.cmake
│   └── turtlesim-msg-paths.cmake
├── images
│   ├── box-turtle.png
│   ├── diamondback.png
│   ├── electric.png
│   ├── fuerte.png
│   ├── groovy.png
│   ├── hydro.png
│   ├── hydro.svg
│   ├── indigo.png
│   ├── indigo.svg
│   ├── jade.png
│   ├── kinetic.png
│   ├── kinetic.svg
│   ├── lunar.png
│   ├── lunar.svg
│   ├── melodic.png
│   ├── palette.png
│   ├── robot-turtle.png
│   ├── sea-turtle.png
│   └── turtle.png
├── msg
│   ├── Color.msg
│   └── Pose.msg
├── package.xml
└── srv
    ├── Kill.srv
    ├── SetPen.srv
    ├── Spawn.srv
    ├── TeleportAbsolute.srv
    └── TeleportRelative.srv

Can anyone help me understand how to pinpoint and locate the turtlesim, or any target, node?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2020-07-29 15:40:41 -0500

praskot gravatar image

If you installed turtlesim using sudo apt-get install ros-melodic-*** then it would be somewhere like this /opt/ros/melodic/lib/turtlesim. Roscd for installed packaged would take you to the include folder (I think).

If you catkin_maked the source code, then it would be in devel/lib/.

edit flag offensive delete link more

Comments

1

Thank you. It was in the directory you specified and not roscd turtlesim. I found it but it didn't help my learning process as I hoped. The script is in binary.

sisko gravatar image sisko  ( 2020-07-29 17:06:33 -0500 )edit

Yeah, it is an executable. But if you are looking to learn about the source code try https://github.com/ros/ros_tutorials.

praskot gravatar image praskot  ( 2020-07-29 17:13:32 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2020-07-29 15:21:13 -0500

Seen: 1,699 times

Last updated: Jul 29 '20