LoginSignup
0
1

More than 5 years have passed since last update.

rosparam.get_param()でプライベート参照ができない

Last updated at Posted at 2017-12-21

問題

pythonでパラメータを扱う時に,プライベート参照("~param")ができなかった.

launchファイル

*.launch

<node pkg="hoge" name="fuga" type="foo.py">
 <param name="~parameter" value="1" />
</node>

pythonファイル

foo.py
rosparam.get_param("~parameter")

だとエラーが出る.

解決方法

rospy.get_param() を使う.

foo.py
rospy.get_param("~parameter")

おわりに

rospy.get_paramではなくrospy.get_param()を使用する.

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1