Skip to content

Conversation

@davetcoleman
Copy link
Member

@davetcoleman davetcoleman commented Sep 17, 2025

Adds examples for Behaviors:

ReadTextFileAsString
PublishString
GetSizeOfVector
InsertInVector
RemoveFromVector
ReplaceInVector

6 Total!

image

Copy link

@rlpratt12 rlpratt12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think with some minor rework this could be super streamlined. The only exception is implementing that template specialization of convertFromString for BT::Any. I'll take a look at how to do that and report back.

@rlpratt12
Copy link

@davetcoleman I committed the new version I was thinking of, see what you think. (we can always revert the commit if you don't like it).

  • Uses GetElementOfVector for the output messages (via str::msg conversion)
  • Interacts with the published message for a more cohesive example

@rlpratt12 rlpratt12 force-pushed the objectathon2 branch 2 times, most recently from 952ebd4 to 245cab9 Compare September 19, 2025 14:00
@davetcoleman
Copy link
Member Author

@rlpratt12 i tweaked and built upon your changes a bit - separating out the command to paste into the terminal and clarifying you might need to use moveit_pro dev

and added back asmiov's laws.

ready for approval

@rlpratt12 rlpratt12 self-requested a review September 19, 2025 19:08
<Control ID="Sequence" name="Test Some Vector Operations">
<Action
ID="Script"
code="string1 := 'Copy and run the following command in your &quot;moveit_pro dev&quot; terminal, then rerun this Objective to get the secret message.'"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't need to be in a dev terminal, any terminal will work. (Unless they've changed their DDS config, in which case they should know the messaging restrictions anyways).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It didn't work on my machine because i do not have ROS installed on the host computer, which is not a requirement of MoveIt Pro to do.

IDK if moveit_pro shell is better, i can never remember the difference

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, I forgot about the case of not having ROS installed at all. I'm good with saying shell then so it always works, which is more appropriate than dev.

@davetcoleman
Copy link
Member Author

@rlpratt12 looking for an Approval here

@rlpratt12 rlpratt12 merged commit d07530c into main Sep 22, 2025
5 checks passed
shaur-k pushed a commit that referenced this pull request Sep 30, 2025
Objectathon Example Vector and String Handling
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants