2021-10-13 05:58:24 +00:00
# Robossembler ROS2
2022-01-12 21:14:36 +04:00
Repo for ROS2 packages related to Robossembler
2022-01-17 00:27:17 +08:00
## Instructions
### Requirements
2023-02-03 07:04:12 +00:00
* OS: Ubuntu 22.04
* ROS 2 Humble
2023-12-30 23:41:50 +03:00
* nlohman/json
2022-01-17 00:27:17 +08:00
### Dependencies
These are the primary dependencies required to use this project.
* MoveIt 2
> Install/build a version based on the selected ROS 2 release
2023-02-03 07:04:12 +00:00
* Gazebo Fortress
2023-12-30 23:41:50 +03:00
* [nlohman/json ](https://github.com/nlohmann/json/releases/tag/v3.11.3 )
2022-01-17 00:27:17 +08:00
### Build
2022-01-12 21:14:36 +04:00
1. Clone the repository
2023-02-03 07:04:12 +00:00
2. Build packages `colcon build`
2022-01-12 21:14:36 +04:00
2023-02-03 07:04:12 +00:00
Prepare workspace & install dependencies (So far only tested with UR robot arm)
2023-03-31 20:24:56 +00:00
```bash
2022-01-12 21:14:36 +04:00
mkdir -p ~/robossembler_ws/src & & cd ~/robossembler_ws/src
2022-01-17 00:27:17 +08:00
git clone https://gitlab.com/robosphere/robossembler-ros2
2023-12-30 23:41:50 +03:00
vcs import . < robossembler-ros2 / rbs . sim . repos
2022-01-12 21:14:36 +04:00
cd ..
2023-02-03 07:04:12 +00:00
rosdep install -y -r -q --from-paths src --ignore-src --rosdistro humble
2023-12-30 23:41:50 +03:00
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release --symlink-install
2023-03-31 20:24:56 +00:00
```
2023-12-30 23:41:50 +03:00
<!-- For simulation with Mujoco, pls [ref ](https://github.com/fzi-forschungszentrum-informatik/cartesian_controllers/blob/fdaa9a2dd0ce15fc949b127dd1164095504273fb/cartesian_controller_simulation/README.md ) build and install section. -->
2023-03-31 20:24:56 +00:00
### Set Gazebo enviroment variables
Replace `[WS_FOLDER]` with your workspace folder
```bash
2023-07-27 12:06:02 +03:00
echo "export IGN_GAZEBO_RESOURCE_PATH=${IGN_GAZEBO_RESOURCE_PATH}:~/[WS_FOLDER]/install/robotiq_description/share/:~/[WS_FOLDER]/install/rbs_simulation/share/rbs_simulation/" >> ~/.bashrc
2022-01-12 21:14:36 +04:00
```
2023-03-31 20:24:56 +00:00
2022-01-17 00:27:17 +08:00
### Examples
2023-07-27 12:06:02 +03:00
Activate current ROS2 enviroment:
2022-01-12 21:14:36 +04:00
```
2023-02-03 07:04:12 +00:00
. install/setup.bash
2022-01-20 00:18:03 +03:00
```
2023-07-27 12:06:02 +03:00
Launch MoveIt2, Gazebo, RViz:
2022-01-12 21:14:36 +04:00
```bash
2023-07-27 12:06:02 +03:00
ros2 launch rbs_bringup bringup.launch.py
2022-01-12 21:14:36 +04:00
```
2023-02-03 07:04:12 +00:00
2023-12-30 23:41:50 +03:00
Start BT node in another terminal
2023-02-03 07:04:12 +00:00
```
2023-12-30 23:41:50 +03:00
ros2 launch rbs_bt_executor rbs_executor.launch.py
2023-07-28 13:06:11 +03:00
```
2022-01-12 21:14:36 +04:00
### Links
* [bt_v3_cpp ](https://www.behaviortree.dev )
2023-12-30 23:41:50 +03:00
* [moveit2 ](https://moveit.picknik.ai/humble/index.html )