Ask Your Question

How can I get currently used rmw_implementation of running nodes?

asked 2020-01-26 07:22:15 -0500

masat gravatar image

I would like to check what rmw_implementation is used for running nodes. Anyone knows how to do it?


edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2020-01-27 11:48:31 -0500

Dirk Thomas gravatar image

Since the question was asking for "running nodes" you can check which shared libraries that process is using. On Linux you can run:

lsof -p <PID> | grep rmw

The list will contain one of the RMW libraries (e.g. beside generic ones like and

edit flag offensive delete link more


Great! That is what I wanted. Thank you Dirk and Steve!

masat gravatar image masat  ( 2020-02-01 01:12:29 -0500 )edit

answered 2020-01-26 14:53:55 -0500

Great question. I assumed when I looked at the RCL or RCLCPP API I'd find something direct to point you to, I was wrong. That sounds like a fabulous feature request for RCL if we are correct that there is indeed no straightforward way to determine that from C++.

Otherwise, there are other ways to easily find this information. In particular, when you set an RMW, you set the environmental variable of RMW_IMPLEMENTATION to the value. That should give you which implementation is in the environment.

I agree however that it would make alot of sense to get a "what is being used currently" rather than a "what is being set to use" in case of some failure or if the environment changed since launch.

edit flag offensive delete link more


Dear Steve,

Thank you for your response.

Yes, I agree that we need "what is used" than "what is set". We can use RMW_IMPLEMENTATION to set RMW as we like. However, I would like to know current RMW of running nodes.

masat gravatar image masat  ( 2020-01-27 08:22:40 -0500 )edit

For now, you can use the environmental variable.

stevemacenski gravatar image stevemacenski  ( 2020-01-27 11:01:12 -0500 )edit

See Dirks answer, that's by far better.

stevemacenski gravatar image stevemacenski  ( 2020-01-27 14:38:10 -0500 )edit

Thanks Steve!

masat gravatar image masat  ( 2020-02-01 01:12:44 -0500 )edit

Your Answer

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

Add Answer

Question Tools



Asked: 2020-01-26 07:22:15 -0500

Seen: 82 times

Last updated: Jan 27 '20