Quantcast
Channel: ROS Answers: Open Source Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 92

How to remap a private parameter

$
0
0
In a launch file I want to remap parameters of my node to other, already existing parameters. It is working for global parameters but not for private ones. This is a simple example node "param.py": #!/usr/bin/env python """Just testing parameter mapping.""" import rospy rospy.init_node("param") print(rospy.get_param("foo")) print(rospy.get_param("bar")) print(rospy.get_param("~baz")) The node is launched by this launch file "param.launch": In a terminal I run: rosparam set foo 42 roslaunch mypkg param.launch The output is: 42 42 KeyError: '~baz' How can I make it work?

Viewing all articles
Browse latest Browse all 92


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>