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 -0600
Seen: 673 times
Last updated: Sep 05 '19
Ros nodes not starting from a launch file
"all processes on machine have died, roslaunch will exit"
rosrun error FileNotFoundError: [Errno 2] No such file or directory
start ros node without a launch file
why roslanuch commond show error?
Publisher sleep forever using roslaunch
Call a service at startup with a launch file