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

Moveit humble #88

Closed
wants to merge 73 commits into from
Closed
Show file tree
Hide file tree
Changes from 32 commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
0d40cad
initialize pkg
Nikhil-Singhal-06 May 28, 2024
c22360e
add moveit launch file
Nikhil-Singhal-06 May 29, 2024
0fc188a
add moveit dependencies
Nikhil-Singhal-06 May 29, 2024
d661965
update dependencies
Nikhil-Singhal-06 May 29, 2024
e9b308b
make format
Nikhil-Singhal-06 May 29, 2024
8e91855
add scenario
Nikhil-Singhal-06 May 29, 2024
48859ec
update submodule
Nikhil-Singhal-06 May 29, 2024
45fbd0f
add actor for arm
Nikhil-Singhal-06 Jun 4, 2024
7a5e3f0
fix parsing error
Nikhil-Singhal-06 Jun 4, 2024
063697a
add gripper action
Nikhil-Singhal-06 Jun 6, 2024
f889630
fix gripper
Nikhil-Singhal-06 Jun 6, 2024
47b085b
add gripper action
Nikhil-Singhal-06 Jun 6, 2024
150aa15
add move_to_pose action
Nikhil-Singhal-06 Jun 7, 2024
8e9eeec
cleanuo
Nikhil-Singhal-06 Jun 7, 2024
f8050e1
improve basic logic
Nikhil-Singhal-06 Jun 7, 2024
66b326e
format fix
Nikhil-Singhal-06 Jun 7, 2024
bbb84dd
add simulation scenario for pick place
Nikhil-Singhal-06 Jun 7, 2024
5995aa4
move file to seperate moveit pkg
Nikhil-Singhal-06 Jun 12, 2024
da3dca8
additional fix
Nikhil-Singhal-06 Jun 12, 2024
621a163
fix format
Nikhil-Singhal-06 Jun 12, 2024
18ebbf8
description cleanup
Nikhil-Singhal-06 Jun 12, 2024
955d2a7
cleanup
Nikhil-Singhal-06 Jun 12, 2024
87c2521
enhance functions
Nikhil-Singhal-06 Jun 13, 2024
8b8cd74
fix gripper initial pos
Nikhil-Singhal-06 Jun 13, 2024
412f0ae
fix launch file
Nikhil-Singhal-06 Jun 13, 2024
5440da5
fix scenario file
Nikhil-Singhal-06 Jun 13, 2024
e03bdbb
cleanup
Nikhil-Singhal-06 Jun 24, 2024
8fc11b3
add world file
Nikhil-Singhal-06 Jun 24, 2024
e26f847
Merge branch 'main' into moveit_humble
Nikhil-Singhal-06 Jun 24, 2024
7a525a8
add singleton
Nikhil-Singhal-06 Jun 24, 2024
df126c4
format
Nikhil-Singhal-06 Jun 24, 2024
d9bb54d
seperate launch files
Nikhil-Singhal-06 Jun 24, 2024
7d57d93
add robot launch
Nikhil-Singhal-06 Jun 25, 2024
a7935b9
Merge 'origin' into moveit_humble
Nikhil-Singhal-06 Jul 3, 2024
b77d268
fix dependency
Nikhil-Singhal-06 Jul 3, 2024
e8ee6e7
Merge branch 'main' into moveit_humble
fred-labs Jul 3, 2024
4686e5d
update actions
Nikhil-Singhal-06 Jul 3, 2024
2f83bc1
fix actions
Nikhil-Singhal-06 Jul 9, 2024
ba13d75
Merge branch 'main' into moveit_humble
Nikhil-Singhal-06 Jul 9, 2024
811758c
rmeove merge files
Nikhil-Singhal-06 Jul 9, 2024
27f05dd
fix submodule update
Nikhil-Singhal-06 Jul 9, 2024
7efd3b8
increase timeout
Nikhil-Singhal-06 Jul 9, 2024
f5f8193
fix retrying
Nikhil-Singhal-06 Jul 9, 2024
7c61c55
test target workflow
Nikhil-Singhal-06 Jul 15, 2024
c3c6af6
fix permission
Nikhil-Singhal-06 Jul 15, 2024
a489d13
fix branch
Nikhil-Singhal-06 Jul 15, 2024
b5f6da9
fix file
Nikhil-Singhal-06 Jul 15, 2024
69852e3
fix syntax
Nikhil-Singhal-06 Jul 15, 2024
e651423
fix url
Nikhil-Singhal-06 Jul 15, 2024
758a0bb
test url]
Nikhil-Singhal-06 Jul 15, 2024
48d50f4
fix syntax
Nikhil-Singhal-06 Jul 15, 2024
4ccb556
fix
Nikhil-Singhal-06 Jul 15, 2024
15effba
fix name
Nikhil-Singhal-06 Jul 15, 2024
24b8d31
Merge branch 'main' into moveit_humble
Nikhil-Singhal-06 Aug 2, 2024
fe4d5b4
move to libs
Nikhil-Singhal-06 Aug 2, 2024
c9480c9
Merge branch 'main' into moveit_humble
Nikhil-Singhal-06 Aug 12, 2024
b168b34
fix move_to_pose
Nikhil-Singhal-06 Aug 19, 2024
f05bf68
Merge branch 'main' into moveit_humble
Nikhil-Singhal-06 Aug 19, 2024
a9af826
fix siulation
Nikhil-Singhal-06 Aug 19, 2024
87728b0
fix packages
Nikhil-Singhal-06 Aug 21, 2024
66842ff
Merge branch 'main' into moveit_humble
Nikhil-Singhal-06 Aug 22, 2024
32faf97
ci
Nikhil-Singhal-06 Aug 22, 2024
57e84a9
Merge branch 'main' into moveit_humble
Nikhil-Singhal-06 Aug 28, 2024
7bfcb7e
fix urdf
Nikhil-Singhal-06 Aug 30, 2024
bbfa477
re-structure launch files
Nikhil-Singhal-06 Aug 30, 2024
dba56a4
format
Nikhil-Singhal-06 Aug 30, 2024
6753e16
Merge branch 'main' into moveit_humble
Nikhil-Singhal-06 Aug 30, 2024
532c73c
add msg_conversion and improvements
Nikhil-Singhal-06 Sep 2, 2024
e48394f
Merge branch 'main' into moveit_humble
Nikhil-Singhal-06 Sep 2, 2024
2f3851d
fix actions
Nikhil-Singhal-06 Sep 3, 2024
b502411
add action server
Nikhil-Singhal-06 Sep 4, 2024
809ad33
launch files setup
Nikhil-Singhal-06 Sep 4, 2024
48cba71
fix action defintion
Nikhil-Singhal-06 Sep 4, 2024
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
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@
[submodule "dependencies/py_trees"]
path = dependencies/py_trees
url = https://github.com/splintered-reality/py_trees.git
[submodule "dependencies/pymoveit2"]
path = dependencies/pymoveit2
url = https://github.com/AndrejOrsula/pymoveit2.git
3 changes: 2 additions & 1 deletion deb_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ ros-humble-turtlebot4-simulator
ros-humble-py-trees-ros-interfaces
python3-autopep8
clang-format
pylint
pylint
ros-humble-moveit
1 change: 1 addition & 0 deletions dependencies/pymoveit2
Submodule pymoveit2 added at d38a65
23 changes: 23 additions & 0 deletions examples/example_moveit_simulation/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Example Simulation MoveIt

To run the Example Simulation Moveit with scenario, first build the `example_moveit_simulation` package:

```bash
colcon build --packages-up-to example_moveit_simulation
```

Source the workspace:

```bash
source install/setup.bash
```

Now, run the following command to launch the scenario:

```bash
ros2 launch arm_sim_scenario sim_moveit_scenario_launch.py scenario:=examples/example_moveit_simulation/scenarios/example_moveit_simulation.osc
```

A turtlebot is initialised with nav2 which drives to a goal and back. During the ride an obstacle is spawned in front of the turtlebot which will then drive around the object.

For a more detailed understanding of the code structure and scenario implementation please refer to the [tutorial documentation](https://intellabs.github.io/scenario_execution/tutorials.html).
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright (C) 2024 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
37 changes: 37 additions & 0 deletions examples/example_moveit_simulation/models/box.sdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?xml version='1.0'?>
<sdf version="1.4">
<model name="my_model">
<pose>0 0 0.5 0 0 0</pose>
<link name="link">
<inertial>
<mass>0.1</mass>
<inertia>
<ixx>0.083</ixx>
<ixy>0.0</ixy>
<ixz>0.0</ixz>
<iyy>0.083</iyy>
<iyz>0.0</iyz>
<izz>0.083</izz>
</inertia>
</inertial>
<collision name="collision">
<geometry>
<box>
<size>0.03 0.03 0.03</size>
</box>
</geometry>
</collision>
<visual name="visual">
<geometry>
<box>
<size>0.03 0.03 0.03</size>
</box>
</geometry>
<material>
<diffuse>0.1 0.1 0.1 1</diffuse>
<specular>0.4 0.4 0.4 1</specular>
</material>
</visual>
</link>
</model>
</sdf>
26 changes: 26 additions & 0 deletions examples/example_moveit_simulation/package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>example_moveit_simulation</name>
<version>1.1.0</version>
<description>Scenario Execution Example for Moveit Simulation</description>
<author email="[email protected]">Intel Labs</author>
<maintainer email="[email protected]">Intel Labs</maintainer>
<license file="../../LICENSE">Apache-2.0</license>

<depend>scenario_execution</depend>
<depend>scenario_execution_gazebo</depend>
<depend>arm_sim_scenario</depend>
<depend>scenario_execution_moveit</depend>

<exec_depend>rclpy</exec_depend>

<test_depend>ament_copyright</test_depend>
<test_depend>ament_flake8</test_depend>
<test_depend>ament_pep257</test_depend>
<test_depend>python3-pytest</test_depend>

<export>
<build_type>ament_python</build_type>
</export>
</package>
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import osc.moveit
import osc.gazebo

scenario example_moveit:
wx200: robotic_arm with:
keep(it.namespace == 'wx200')
Nikhil-Singhal-06 marked this conversation as resolved.
Show resolved Hide resolved
keep(it.joint_names == ["waist","shoulder","elbow","wrist_angle","wrist_rotate","left_finger","right_finger"])
keep(it.base_link_name == 'base_link')
keep(it.end_effector_name == 'gripper_link')
keep(it.gripper_joint_names == ["right_finger","left_finger"])
keep(it.move_group_arm == 'interbotix_arm')
keep(it.move_group_gripper == 'interbotix_gripper')
keep(it.open_gripper_position == '[-0.037, +0.037]')
keep(it.close_gripper_position == '[-0.015, +0.015]')
box: osc_actor
do parallel:
serial:
box.spawn(spawn_pose: pose_3d(
position: position_3d(x: 0.25m, y: 0.0m, z: 0.02m),
orientation: orientation_3d(yaw: 0.0rad)),
model: 'example_moveit_simulation://models/box.sdf',world_name: 'empty')
serial:
wx200.move_to_joint_pose() with:
keep(it.joint_pose == '[0.0, 0.122173, 0.296706, 1.0472, 0.0]')
wx200.move_gripper() with:
keep(it.gripper == 'open')
wx200.move_to_joint_pose() with:
keep(it.joint_pose == '[0.0, 0.296706, 0.296706, 1.22173, 0.0]')
wx200.move_gripper() with:
keep(it.gripper == 'close')
wx200.move_to_pose(pose_3d(position: position_3d(x: 0.1m, y: 0.0m, z: 0.4m)))
wx200.move_to_joint_pose() with:
keep(it.joint_pose == '[0.5235, 0.0, 0.0, 0.0, 0.0]')
wx200.move_gripper() with:
keep(it.gripper == 'open')
wx200.move_to_pose(pose_3d(position: position_3d(x: 0.1m, y: 0.0m, z: 0.4m)))
wait elapsed(3s)
emit end
time_out: serial:
wait elapsed(60s)
emit fail
43 changes: 43 additions & 0 deletions examples/example_moveit_simulation/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Copyright (C) 2024 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0

from glob import glob
import os
from setuptools import setup

PACKAGE_NAME = 'example_moveit_simulation'

setup(
name=PACKAGE_NAME,
version='1.1.0',
packages=[PACKAGE_NAME],
data_files=[
('share/ament_index/resource_index/packages',
['resource/' + PACKAGE_NAME]),
('share/' + PACKAGE_NAME, ['package.xml']),
(os.path.join('share', PACKAGE_NAME, 'scenarios'), glob('scenarios/*.osc')),
(os.path.join('share', PACKAGE_NAME, 'models'), glob('models/*.sdf')),
],
install_requires=['setuptools'],
zip_safe=True,
maintainer='Intel Labs',
maintainer_email='[email protected]',
description='Scenario Execution Example for Moveit Simulation',
license='Apache License 2.0',
tests_require=['pytest'],
entry_points={
},
)
37 changes: 37 additions & 0 deletions examples/example_simulation/models/box_moveit.sdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?xml version='1.0'?>
<sdf version="1.4">
<model name="my_model">
<pose>0 0 0.5 0 0 0</pose>
<link name="link">
<inertial>
<mass>0.1</mass>
<inertia>
<ixx>0.083</ixx>
<ixy>0.0</ixy>
<ixz>0.0</ixz>
<iyy>0.083</iyy>
<iyz>0.0</iyz>
<izz>0.083</izz>
</inertia>
</inertial>
<collision name="collision">
<geometry>
<box>
<size>0.03 0.03 0.03</size>
</box>
</geometry>
</collision>
<visual name="visual">
<geometry>
<box>
<size>0.03 0.03 0.03</size>
</box>
</geometry>
<material>
<diffuse>0.1 0.1 0.1 1</diffuse>
<specular>0.4 0.4 0.4 1</specular>
</material>
</visual>
</link>
</model>
</sdf>
1 change: 1 addition & 0 deletions scenario_execution_moveit/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include scenario_execution_moveit/lib_osc/*.osc
4 changes: 4 additions & 0 deletions scenario_execution_moveit/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Scenario Execution MOVEIT

The `scenario_execution_moveit` package provides actions to control robotic manipulator using [Moveit](https://moveit.picknik.ai/main/index.html) library.

30 changes: 30 additions & 0 deletions scenario_execution_moveit/package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>scenario_execution_moveit</name>
<version>1.1.0</version>
<description>Scenario Execution for MOVEIT</description>
<author email="[email protected]">Intel Labs</author>
<maintainer email="[email protected]">Intel Labs</maintainer>
<license file="../LICENSE">Apache-2.0</license>

<depend>scenario_execution</depend>

<exec_depend>rclpy</exec_depend>
<exec_depend>py_trees</exec_depend>
<exec_depend>py_trees_ros</exec_depend>
<exec_depend>visualization_msgs</exec_depend>
<exec_depend>pymoveit2</exec_depend>
<exec_depend>xacro</exec_depend>
<exec_depend>rcl_interfaces</exec_depend>
<exec_depend>scenario_status</exec_depend>

<test_depend>ament_copyright</test_depend>
<test_depend>ament_flake8</test_depend>
<test_depend>ament_pep257</test_depend>
<test_depend>python3-pytest</test_depend>

<export>
<build_type>ament_python</build_type>
</export>
</package>
Empty file.
23 changes: 23 additions & 0 deletions scenario_execution_moveit/scenario_execution_moveit/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright (C) 2024 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0

""" Main entry for scenario execution """

from . import actions

__all__ = [
'actions',
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright (C) 2024 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
Loading
Loading