Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add replace item unique ID functionality to user debug functions #4652

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions examples/SharedMemory/b3RobotSimulatorClientAPI_NoDirect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1638,6 +1638,9 @@ int b3RobotSimulatorClientAPI_NoDirect::addUserDebugText(const char* text, doubl
{
b3UserDebugTextSetOrientation(commandHandle, &args.m_textOrientation[0]);
}
if (args.m_replaceItemUniqueId >=0){
b3UserDebugItemSetReplaceItemUniqueId( commandHandle, args.m_replaceItemUniqueId);
}

statusHandle = b3SubmitClientCommandAndWaitStatus(sm, commandHandle);
statusType = b3GetStatusType(statusHandle);
Expand Down Expand Up @@ -1679,6 +1682,9 @@ int b3RobotSimulatorClientAPI_NoDirect::addUserDebugLine(double* fromXYZ, double
{
b3UserDebugItemSetParentObject(commandHandle, args.m_parentObjectUniqueId, args.m_parentLinkIndex);
}
if (args.m_replaceItemUniqueId >=0){
b3UserDebugItemSetReplaceItemUniqueId( commandHandle, args.m_replaceItemUniqueId);
}

statusHandle = b3SubmitClientCommandAndWaitStatus(sm, commandHandle);
statusType = b3GetStatusType(statusHandle);
Expand Down
3 changes: 2 additions & 1 deletion examples/SharedMemory/b3RobotSimulatorClientAPI_NoDirect.h
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ struct b3RobotSimulatorAddUserDebugLineArgs
double m_lifeTime;
int m_parentObjectUniqueId;
int m_parentLinkIndex;

int m_replaceItemUniqueId;
b3RobotSimulatorAddUserDebugLineArgs()
: m_lineWidth(1),
m_lifeTime(0),
Expand All @@ -426,6 +426,7 @@ struct b3RobotSimulatorAddUserDebugTextArgs
int m_parentObjectUniqueId;
int m_parentLinkIndex;
int m_flags;
int m_replaceItemUniqueId;

b3RobotSimulatorAddUserDebugTextArgs()
: m_size(1),
Expand Down