Open sloretz opened 6 years ago
It can be difficult to remap the parameter name passed to initParam (usually robot_description). This may be due to the call to searchParam().
initParam
robot_description
searchParam()
https://github.com/ros/urdf/blob/470729633ba0419735603a054fec0b5bbfe442f9/urdf/src/model.cpp#L96-L99
This appears to work
<?xml version="1.0"?> <launch> <param name="robot_description" type="str" value="Dummy value to trick searchParam"/> <node pkg="robot_state_publisher" name="private_robot_state_pub" type="robot_state_publisher"> <remap from="/robot_description" to="~/robot_description"/> <param name="~/robot_description" type="str" value="<robot name="private_robot"><link name="private_link"/></robot>"/> </node> </launch>
And these result in the following error
[ERROR] [1530889965.789570642]: Could not find parameter robot_description on parameter server
no dummy global parameter
<?xml version="1.0"?> <launch> <node pkg="robot_state_publisher" name="private_robot_state_pub" type="robot_state_publisher"> <remap from="/robot_description" to="~/robot_description"/> <param name="~/robot_description" type="str" value="<robot name="private_robot"><link name="private_link"/></robot>"/> </node> </launch>
dummy parameter, but non-FQN in remap rule
<?xml version="1.0"?> <launch> <param name="robot_description" type="str" value="Dummy value to trick searchParam"/> <node pkg="robot_state_publisher" name="private_robot_state_pub" type="robot_state_publisher"> <remap from="robot_description" to="~/robot_description"/> <param name="~/robot_description" type="str" value="<robot name="private_robot"><link name="private_link"/></robot>"/> </node> </launch>
Motivated by ros/robot_state_publisher#89
It can be difficult to remap the parameter name passed to
initParam
(usuallyrobot_description
). This may be due to the call tosearchParam()
.https://github.com/ros/urdf/blob/470729633ba0419735603a054fec0b5bbfe442f9/urdf/src/model.cpp#L96-L99
This appears to work
And these result in the following error
no dummy global parameter
dummy parameter, but non-FQN in remap rule
Motivated by ros/robot_state_publisher#89