ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Dear Panda1638
I changed the line of code that you suggest in the joint_trajectory_controller_impl.h file from
urdf::ModelSharedPtr urdf = getUrdf(root_nh, "robot_description");
to
std::string robot_description = "robot_description";
controller_nh_.getParam("robot_description", robot_description);
boost::shared_ptr<urdf::Model> urdf = getUrdf(root_nh, robot_description);
and i specified the robot_description in my controllers .yaml file as so :
boom_robot_arm_controller:
robot_description: robot_description
type: position_controllers/JointTrajectoryController
joints:
....
I recompiled the joint_trajectory_controller pkg and when i try to choose the controller manage ns i get the following error :
Traceback (most recent call last):
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_joint_trajectory_controller/joint_trajectory_controller.py", line 271, in _on_cm_change
self._update_jtc_list()
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_joint_trajectory_controller/joint_trajectory_controller.py", line 243, in _update_jtc_list
self._robot_joint_limits = get_joint_limits() # Lazy evaluation
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_joint_trajectory_controller/joint_limits_urdf.py", line 21, in get_joint_limits
description = rospy.get_param(key)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/client.py", line 465, in get_param
return _param_server[param_name] #MasterProxy does all the magic for us
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/msproxy.py", line 123, in __getitem__
raise KeyError(key)
KeyError: 'robot_description'
This is my robot group namespace in my launch file :
<group ns="/boom_robot_arm_gazebo">
<param name="tf_prefix"
value="boom_robot_arm_gazebo" />
<!-- <rosparam file="$(find robot_description)/config/control.yaml" command="load" ns="/robot1" /> -->
<param name="robot_description"
command="$(find xacro)/xacro --inorder $(find boom_robot_gazebo)/urdf/boom_robot_arm_gazebo.xacro"/>
<!-- Spawning the robot arm initial joint poses don't work because of gazebo_ros_control, maybe in gazebo 11 -->
<node name="boom_robot_arm_gazebo_spawn"
pkg="gazebo_ros"
type="spawn_model"
respawn="false"
output="screen"
args="-urdf -param robot_description -model boom_robot_arm_gazebo -x 19 -y 0 -z 0.0 -R 0.0 -P 0.0 -Y -1.57079632679 Turret_Joint 0 -J Boom_Joint 0 -J Boom_telesc1_Joint 0 -J Boom_telesc2_Joint 0 -J Rotary_hydraulic_cylinder_Joint 0 -J Basket_Joint 0 -J Chariot_Joint 0 -J Frame_Joint 0 -J Slider_Joint 0 -J Effector_Joint 0">
</node>
<!-- convert joint states to TF transforms for rviz, etc -->
<node name="robot_state_publisher_2" pkg="robot_state_publisher" type="robot_state_publisher"
output="screen">
</node>
<!-- init and start Gazebo ros_control interface for boom_robot_arm_gazebo -->
<include file="$(find boom_robot_gazebo)/launch/boom_robot_arm_gazebo_control.launch"/>
</group>
Can you please help me with this problem. I also tried "robot_description: /boom_robot_arm_gazebo_control/robot_description" in the controllers yaml file.
Thank you