Eval roslaunch substitution expression from console
Can I do that? For example
$ roslaunch eval '$(find my_package)/some_file'
/path/to/my/package/some_file
ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
Can I do that? For example
$ roslaunch eval '$(find my_package)/some_file'
/path/to/my/package/some_file
Afaik there is no entrypoint provided for that, but the following oneliner works for me (just an example):
python -c 'import roslaunch; print roslaunch.substitution_args.resolve_args("$(find rospy)")'
This prints:
/opt/ros/lunar/share/rospy
on a Lunar installation.
If you're only interested in finding the locations of packages, then catkin_find_pkg
might be an alternative:
catkin_find_pkg rospy /opt/ros
Is this what you're trying to do?
$ roslaunch $(rospack find my_package)/some_file
instead of
$ roslaunch my_package my_file.launch
or
$(rospack find my_package)/some_file
to get /path/to/my/package/some_file
I'm aware of rospack find, but I'm not only interested in this case, the question is stated as I need it
Asked: 2017-11-22 08:28:04 -0500
Seen: 689 times
Last updated: Sep 05 '19
rosrun error FileNotFoundError: [Errno 2] No such file or directory
rosluanch turtlebot_bring minimal.launch
Works with rosrun but not with roslaunch
ROS TCP Connector C# Lost Publishers & Freezing
roslaunch xml: how to pass a list of strings as parameters?
roslaunch if/unless for non-boolean arguments
Launch files not copied into share folder by catkin_make