Skip to content

Commit

Permalink
Allow to pass string alists when recursively setting ros params
Browse files Browse the repository at this point in the history
  • Loading branch information
Affonso-Gui committed May 2, 2022
1 parent 87af083 commit 5034de3
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion roseus/roseus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1293,8 +1293,12 @@ void EusValueToXmlRpc(register context *ctx, pointer argp, XmlRpc::XmlRpcValue&
string skey = string((char *)get_string(ccar(v)->c.sym.pname));
boost::algorithm::to_lower(skey);
stringstream << "<member><name>" << skey << "</name><value><boolean>0</boolean></value></member>";
}
else if ( isstring(ccar(v)) ) {
string skey = string((char *)get_string(ccar(v)));
stringstream << "<member><name>" << skey << "</name><value><boolean>0</boolean></value></member>";
}else{
ROS_ERROR("ROSEUS_SET_PARAM: EusValueToXmlRpc: assuming symbol");prinx(ctx,ccar(v),ERROUT);flushstream(ERROUT);terpri(ERROUT);
ROS_ERROR("ROSEUS_SET_PARAM: EusValueToXmlRpc: invalid param name; requires symbol or string");prinx(ctx,ccar(v),ERROUT);flushstream(ERROUT);terpri(ERROUT);
}
}else{
ROS_ERROR("ROSEUS_SET_PARAM: EusValueToXmlRpc: assuming alist");prinx(ctx,argp,ERROUT);flushstream(ERROUT);terpri(ERROUT);
Expand All @@ -1315,6 +1319,12 @@ void EusValueToXmlRpc(register context *ctx, pointer argp, XmlRpc::XmlRpcValue&
EusValueToXmlRpc(ctx, ccdr(v), p);
rpc_value[skey] = p;
}
else if ( isstring(ccar(v)) ) {
string skey = string((char *)get_string(ccar(v)));
XmlRpc::XmlRpcValue p;
EusValueToXmlRpc(ctx, ccdr(v), p);
rpc_value[skey] = p;
}
}
a=ccdr(a);
}
Expand Down

0 comments on commit 5034de3

Please sign in to comment.