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

Draft: Add ros_bt_py technology info + examples #41

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Oberacda
Copy link
Collaborator

No description provided.

Signed-off-by: David Oberacker <[email protected]>
@Oberacda Oberacda self-assigned this Sep 16, 2024
Copy link
Collaborator

@sea-bass sea-bass left a comment

Choose a reason for hiding this comment

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

I could get this all running! Took me a while to figure out how to properly set a String constant and connect it, but it worked.

image


While things were building, I read through and found a few typos. Plus, maybe one thing to clarify in the code.

Also, you may need to run pre-commit still, as there are formatting errors.

@@ -8,7 +8,7 @@ export PYTHONWARNINGS="ignore:setup.py install is deprecated,ignore:easy_install

export ROS_WS=/delib_ws
export WORKSPACE_ROOT=$ROS_WS # For FlexBE compatibility
export ROS_DOMAIN_ID=0
export ROS_DOMAIN_ID=66
Copy link
Collaborator

Choose a reason for hiding this comment

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

do not commit? (or rather, we need to fix this)


To get started with `ros_bt_py` as part of the workshop no additonal packages would be required.
We provide generic nodes for interacting with ROS Topics, Services and Actions, which only require having the messages available in your environment when starting `ros_bt_py`.
Nevertheless we provided the `ros_bt_py_pyrobosim` package containing some additonal nodes, providing convinience wrappers, making interacting with `pyrobosim` simpler.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Nevertheless we provided the `ros_bt_py_pyrobosim` package containing some additonal nodes, providing convinience wrappers, making interacting with `pyrobosim` simpler.
Nevertheless we provided the `ros_bt_py_pyrobosim` package containing some additional nodes, providing convenience wrappers, making interacting with `pyrobosim` simpler.

ros2 run delib_ws_worlds run --ros-args -p problem_number:=1
```

To run `ros_bt_py` with these convinience nodes you need to run:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
To run `ros_bt_py` with these convinience nodes you need to run:
To run `ros_bt_py` with these convenience nodes you need to run:

ros2 launch ros_bt_py_pyrobosim ros_bt_py_pyrobosim.launch.py
```

Alternativly, to launch the regular `ros_bt_py` without any additional nodes run:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Alternativly, to launch the regular `ros_bt_py` without any additional nodes run:
Alternatively, to launch the regular `ros_bt_py` without any additional nodes run:

The WebUI has four distinct sections:
* On the left you have the list of available nodes.
These can be moved into the main editing area at the center to add them to the tree.
Some nodes (e.g. EnumConstant) require you to click on the node in the list and add required details at the bottom of the editing window before they can be added to the tree via the `AddToTree` button.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Some nodes (e.g. EnumConstant) require you to click on the node in the list and add required details at the bottom of the editing window before they can be added to the tree via the `AddToTree` button.
Some nodes (e.g. `EnumConstant`) require you to click on the node in the list and add required details at the bottom of the editing window before they can be added to the tree via the `AddToTree` button.

Comment on lines +89 to +90
- [ ] Provide example solutiont trees for all problems.
- [ ] Add convinience nodes for pyrobosim interaction.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- [ ] Provide example solutiont trees for all problems.
- [ ] Add convinience nodes for pyrobosim interaction.
- [ ] Provide example solution trees for all problems.
- [ ] Add convenience nodes for pyrobosim interaction.

def set_outputs(self):
response: RequestWorldState.Response = self._service_request_future.result()
robot_with_matching_name: List[RobotState] = [robot for robot in response.state.robots if robot.name == self.inputs["robot_name"]]
if len(robot_with_matching_name) != 1:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not necessarily true; if this is 0, then the robot was not found, right?

Comment on lines +47 to +48
self.logerr("Found more then one matching robot!")
raise BehaviorTreeException("Found more then one matching robot!")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
self.logerr("Found more then one matching robot!")
raise BehaviorTreeException("Found more then one matching robot!")
message = "Found more than one matching robot!"
self.logerr(message)
raise BehaviorTreeException(message)

either way note the typo: "then" -> "than"

Comment on lines +83 to +84
if len(obj_with_matching_name) != 1:
self.logerr("Found something other than one matching object!")
Copy link
Collaborator

Choose a reason for hiding this comment

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

For this one, the error message is correct in that it's just "other than one" -- but it might still be nice to separate the empty vs. multiple-element case

(although, PyRoboSim should not let you add duplicate objects and robots with the same name, it's still good to have)

Comment on lines 1 to 4
[develop]
script_dir=$base/lib/roscon2024_delib_ws_bt
[install]
install_scripts=$base/lib/roscon2024_delib_ws_bt
Copy link
Collaborator

Choose a reason for hiding this comment

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

Did this package get renamed? roscon2024_delib_ws_bt is not the name of the package, and these files typically use the same name as the package, right?

dcconner pushed a commit that referenced this pull request Oct 3, 2024
@dcconner dcconner mentioned this pull request Oct 3, 2024
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.

2 participants