I have the following error message:
/home/username/ros_workspace/my_controller_pkg/src/my_controller_file.cpp:52: error: ‘class pr2_mechanism_model::JointState’ has no member named ‘position_1’
/home/username/ros_workspace/my_controller_pkg/src/my_controller_file.cpp:53: error: ‘class pr2_mechanism_model::JointState’ has no member named ‘position_2’
I think it mean I have to delare "position_1" and "position_2" in the "joint.h" file, but this header file belongs to ROS stack so that it will not be changed. Is anybody who know how to modify the C++ header file belonged to ROS stack?
Originally posted by maruchi on ROS Answers with karma: 157 on 2011-12-01
Post score: 0
Original comments
Comment by tfoote on 2011-12-01:
Please edit your question instead of replying with a "answer". Also I recommend using the preformatted blocks for code. Highlight the code and press the 101010 button.
Comment by maruchi on 2011-12-01:
Please find the attached below header file "my_controller_pkg.h". Thanks dornhege.
Comment by dornhege on 2011-12-01:
It's better to update your original post for readabilty.
Comment by maruchi on 2011-12-01:
I think your suggestion will be the right solution. I am trying to working it out with still learning C++. Could you give more detail instructions for the below C++ header file?
Comment by dornhege on 2011-12-01:
Are you sure, you need to do that. Can't you create two instances of JointState?