|
@@ -94,19 +94,19 @@ namespace ROS2
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
- auto commandIter = message.data.cbegin();
|
|
|
|
- for (const auto& jointName : m_jointNames)
|
|
|
|
|
|
+ for(int i=0; i<message.data.size(); i++)
|
|
{
|
|
{
|
|
AZ::Outcome<void, AZStd::string> result;
|
|
AZ::Outcome<void, AZStd::string> result;
|
|
JointsManipulationRequestBus::EventResult(
|
|
JointsManipulationRequestBus::EventResult(
|
|
- result, m_rootOfArticulation, &JointsManipulationRequests::MoveJointToPosition, jointName, *commandIter);
|
|
|
|
|
|
+ result, m_rootOfArticulation, &JointsManipulationRequests::MoveJointToPosition, m_jointNames[i], message.data[i]);
|
|
if (!result.IsSuccess())
|
|
if (!result.IsSuccess())
|
|
{
|
|
{
|
|
AZ_Error(
|
|
AZ_Error(
|
|
"JointsPositionsComponent",
|
|
"JointsPositionsComponent",
|
|
result,
|
|
result,
|
|
- "PositionController: command failed for joint %s: ",
|
|
|
|
- jointName.c_str(),
|
|
|
|
|
|
+ "PositionController: failed for joint %s and command %d: ",
|
|
|
|
+ m_jointNames[i].c_str(),
|
|
|
|
+ message.data[i],
|
|
result.GetError().c_str());
|
|
result.GetError().c_str());
|
|
}
|
|
}
|
|
}
|
|
}
|