Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ lib/*
*.zip

int-ball2_isaac_sim/assets
ib2_interfaces/
25 changes: 4 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@
![GitHub fork](https://img.shields.io/github/forks/sd-robotics/int-ball2_isaac_sim)
![GitHub stars](https://img.shields.io/github/stars/sd-robotics/int-ball2_isaac_sim)

<!-- [![Ubuntu22.04](https://img.shields.io/badge/Ubuntu-22.04-orange.svg)](https://ubuntu.com/tutorials/install-ubuntu-desktop#1-overview) -->
<!-- [![IsaacSim](https://img.shields.io/badge/IsaacSim-4.2.0-green.svg)](https://docs.omniverse.nvidia.com/isaacsim/latest/overview.html) -->
<!-- [![Python](https://img.shields.io/badge/python-3.10-blue.svg)](https://docs.python.org/3/whatsnew/3.10.html) -->
<!-- [![ros2-humble installation](https://img.shields.io/badge/ROS2-Humble-blue.svg)](https://docs.ros.org/en/humble/Installation/Alternatives/Ubuntu-Development-Setup.html) -->

<p style="display: inline">
<img src="https://img.shields.io/badge/-Ubuntu_22.04_LTS-555555.svg?style=flat&logo=ubuntu">
<img src="https://img.shields.io/badge/-Isaac_Sim 4.5.0-76B900.svg?style=flat&logo=nvidia&logoColor=white">
Expand All @@ -30,8 +25,7 @@

3. [**Installation**](#installation)
1. [Clone Repository](#clone-repository)
2. [Install Dependencies](#install-dependencies)
3. [Download Assets](#download-assets)
2. [Download Assets and Install Dependencies](#download-assets-and-install-dependencies)

4. [**Usage**](#usage)
1. [Build & Source](#build--source)
Expand Down Expand Up @@ -62,7 +56,7 @@ In order to use this project, you need to get ready the following environment.
| Package | Version |
| --------- | ----------------------- |
| Ubuntu | 22.04 (Jammy Jellyfish) |
| Isaac Sim | 4.2.0 (September 2024) |
| Isaac Sim | 4.5.0 |
| ROS | Humble Hawksbill |
| Python | 3.10 <= |

Expand All @@ -79,24 +73,13 @@ Clone this package into your workspace.
git clone https://github.com/sd-robotics/int-ball2_isaac_sim.git
```

### Install Dependencies
Move into your workspace.
```bash
cd ~/int-ball2_ws/
```

Install the dependencies.
``` bash
rosdep install --from-paths src --ignore-src -r -y
```

### Download Assets
### Download Assets and Install Dependencies
Move into this project folder.
```bash
cd ~/int-ball2_ws/src/int-ball2_isaac_sim
```

Download the assets (Int-Ball2, JEM, etc).
Download the assets (Int-Ball2, JEM, etc) and install software dependencies.
```bash
bash install_local.sh
```
Expand Down
29 changes: 6 additions & 23 deletions README_JA.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,9 @@
![GitHub fork](https://img.shields.io/github/forks/sd-robotics/int-ball2_isaac_sim)
![GitHub stars](https://img.shields.io/github/stars/sd-robotics/int-ball2_isaac_sim)

<!-- [![Ubuntu22.04](https://img.shields.io/badge/Ubuntu-22.04-orange.svg)](https://ubuntu.com/tutorials/install-ubuntu-desktop#1-overview) -->
<!-- [![IsaacSim](https://img.shields.io/badge/IsaacSim-4.2.0-green.svg)](https://docs.omniverse.nvidia.com/isaacsim/latest/overview.html) -->
<!-- [![Python](https://img.shields.io/badge/python-3.10-blue.svg)](https://docs.python.org/3/whatsnew/3.10.html) -->
<!-- [![ros2-humble installation](https://img.shields.io/badge/ROS2-Humble-blue.svg)](https://docs.ros.org/en/humble/Installation/Alternatives/Ubuntu-Development-Setup.html) -->

<p style="display: inline">
<img src="https://img.shields.io/badge/-Ubuntu_22.04_LTS-555555.svg?style=flat&logo=ubuntu">
<img src="https://img.shields.io/badge/-Isaac_Sim 4.2.0-76B900.svg?style=flat&logo=nvidia&logoColor=white">
<img src="https://img.shields.io/badge/-Isaac_Sim 4.5.0-76B900.svg?style=flat&logo=nvidia&logoColor=white">
<img src="https://img.shields.io/badge/-ROS2 Humble-%2322314E?style=flat&logo=ROS&logoColor=white">
<img src="https://img.shields.io/badge/-Python 3.10-3776AB.svg?logo=python&style=flat&logoColor=white">
<img src="https://img.shields.io/badge/License-Apache--2.0-60C060.svg?style=flat">
Expand All @@ -30,8 +25,7 @@

3. [**インストール**](#インストール)
1. [リポジトリのクローン](#リポジトリのクローン)
2. [依存関係のインストール](#依存関係のインストール)
3. [アセットのダウンロード](#アセットのダウンロード)
2. [アセットのダウンロードと依存関係のインストール](#アセットのダウンロードと依存関係のインストール)

4. [**使い方**](#使い方)
1. [ビルド & ソース](#ビルド--ソース)
Expand Down Expand Up @@ -63,7 +57,7 @@ ISS/JEM環境におけるInt-Ball2の挙動を、ユーザー開発プログラ
| Package | Version |
| --------- | ----------------------- |
| Ubuntu | 22.04 (Jammy Jellyfish) |
| Isaac Sim | 4.2.0 (September 2024) |
| Isaac Sim | 4.5.0 |
| ROS | Humble Hawksbill |
| Python | 3.10 <= |

Expand All @@ -80,24 +74,13 @@ cd ~/int-ball2_ws/src
git clone https://github.com/sd-robotics/int-ball2_isaac_sim.git
```

### 依存関係のインストール
ワークスペースまで移動します。
```bash
cd ~/int-ball2_ws/
```

依存関係をインストールします。
``` bash
rosdep install --from-paths src --ignore-src -r -y
```

### アセットのダウンロード
### アセットのダウンロードと依存関係のインストール
プロジェクトまで移動します。
```bash
cd ~/int-ball2_ws/src/int-ball2_isaac_sim
```

アセットをダウンロードします(Int-Ball2、JEM等)
アセットをダウンロードと依存関係のインストールを行います
```bash
bash install_local.sh
```
Expand All @@ -114,7 +97,7 @@ source install/setup.bash
### シミュレータの起動方法
ros2 launchでシミュレータを起動します。
```bash
ros2 launch int-ball2_isaac_sim int-ball2_isaac_sim.launch.py gui:="~/int-ball2_ws/src/int-ball2_isaac_sim/assets/KIBOU.usd"
ros2 launch ib2_isaac_sim int-ball2_isaac_sim.launch.py usd_file:="KIBOU.usd"
```

> [!NOTE]
Expand Down
6 changes: 5 additions & 1 deletion install_local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ cd "$CRT_DIR"

# Clone ib2 interface repository
if [ ! -d "ib2_interfaces" ]; then
git clone git@github.com:sd-robotics/ib2_interfaces.git
git clone https://github.com/sd-robotics/ib2_interfaces.git
else
echo "ib2_interfaces directory already exists, skipping clone."
fi
Expand Down Expand Up @@ -70,5 +70,9 @@ else
cd "$CRT_DIR"
fi

# rosdep dependencies
echo "Install ros2 packages dependencies"
cd ../../
rosdep install --from-paths src --ignore-src -r -y

echo "Local installation complete!"
10 changes: 8 additions & 2 deletions int-ball2_control/launch/int-ball2_teleop.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,20 @@ def generate_launch_description():
package = 'int-ball2_control',
executable = 'direct_velocity_control.py',
name = 'ib2_vel_ctrl',
output = 'screen'
output = 'screen',
parameters=[{
'use_sim_time': True
}]
)

intball2_effort_joy_node = Node(
package = 'int-ball2_control',
executable = 'direct_effort_control.py',
name = 'ib2_eff_ctrl',
output = 'screen'
output = 'screen',
parameters=[{
'use_sim_time': True
}]
)

return LaunchDescription([
Expand Down
23 changes: 12 additions & 11 deletions int-ball2_control/scripts/direct_effort_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import rclpy
from rclpy.node import Node
from sensor_msgs.msg import Joy
from geometry_msgs.msg import Wrench
from geometry_msgs.msg import WrenchStamped

class IntBall2ForceController(Node):
def __init__(self):
Expand All @@ -22,38 +22,39 @@ def __init__(self):
)

# Publisher for force/torque
self.wrench_publisher = self.create_publisher(Wrench, "/ctl/wrench", 10)
self.wrench_publisher = self.create_publisher(WrenchStamped, "/ctl/wrench", 10)

self.get_logger().info("Int-Ball2 Force Controller Node Initialized")

def joy_callback(self, msg):
"""
Callback for handling joystick inputs and mapping them to Wrench messages.
"""
wrench = Wrench()
wrench = WrenchStamped()
wrench.header.stamp = self.get_clock().now().to_msg()

# Left stick controls force in X and Y
wrench.force.x = msg.axes[1] * self.force_scale # Left stick X
wrench.force.y = msg.axes[0] * self.force_scale # Left stick Y
wrench.wrench.force.x = msg.axes[1] * self.force_scale # Left stick X
wrench.wrench.force.y = msg.axes[0] * self.force_scale # Left stick Y

# Right stick controls rotation (torque) in X and Y
wrench.torque.x = msg.axes[4] * self.torque_scale # Right stick X
wrench.torque.y = msg.axes[3] * self.torque_scale # Right stick Y
wrench.wrench.torque.x = msg.axes[4] * self.torque_scale # Right stick X
wrench.wrench.torque.y = msg.axes[3] * self.torque_scale # Right stick Y

# L2 (Axis 2) and R2 (Axis 5) control force in Z
L2 = (1 - msg.axes[2]) / 2 # Convert from [-1, 1] to [0, 1]
R2 = (1 - msg.axes[5]) / 2 # Convert from [-1, 1] to [0, 1]

if msg.buttons[1]:
wrench.force.z = (R2 - L2) * self.force_scale # R2 increases, L2 decreases
wrench.wrench.force.z = (R2 - L2) * self.force_scale # R2 increases, L2 decreases
elif msg.buttons[0]:
wrench.torque.z = (R2 - L2) * self.torque_scale # R2 increases, L2 decreases
wrench.wrench.torque.z = (R2 - L2) * self.torque_scale # R2 increases, L2 decreases

# Publish the wrench message
self.wrench_publisher.publish(wrench)
self.get_logger().info(
f"Published wrench: Force({wrench.force.x}, {wrench.force.y}, {wrench.force.z}) | "
f"Torque({wrench.torque.x}, {wrench.torque.y}, {wrench.torque.z})"
f"Published wrench: Force({wrench.wrench.force.x}, {wrench.wrench.force.y}, {wrench.wrench.force.z}) | "
f"Torque({wrench.wrench.torque.x}, {wrench.wrench.torque.y}, {wrench.wrench.torque.z})"
)

def main(args=None):
Expand Down
4 changes: 3 additions & 1 deletion int-ball2_data_replay/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,6 @@ if(BUILD_TESTING)
ament_lint_auto_find_test_dependencies()
endif()

ament_auto_package()
ament_auto_package(
USE_SCOPED_HEADER_INSTALL_DIR
)
28 changes: 26 additions & 2 deletions int-ball2_isaac_sim/launch/int-ball2_isaac_sim.launch.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument, IncludeLaunchDescription
from launch.actions import DeclareLaunchArgument, IncludeLaunchDescription, SetEnvironmentVariable
from launch.launch_description_sources import PythonLaunchDescriptionSource
from launch.substitutions import LaunchConfiguration, PathJoinSubstitution, TextSubstitution
from launch_ros.substitutions import FindPackageShare
Expand Down Expand Up @@ -27,10 +27,31 @@ def generate_launch_description():
default_value='false',
description='Play Isaac Sim after the scene is loaded'
),
# Forwarded args to upstream run_isaacsim.launch.py to ensure correct ROS setup
DeclareLaunchArgument(
'use_internal_libs',
default_value='false',
description='Use ROS libraries shipped with Isaac Sim to avoid host ROS conflicts'
),
DeclareLaunchArgument(
'dds_type',
default_value='fastdds',
description='DDS implementation for Isaac Sim ROS bridge (fastdds or cyclonedds)'
),
DeclareLaunchArgument(
'ros_distro',
default_value='humble',
description='ROS distribution to use inside Isaac Sim'
),
DeclareLaunchArgument(
'exclude_install_path',
default_value='',
description='Comma-separated install paths to exclude from Isaac Sim environment (e.g., /opt/ros/humble,~/ws/install)'
),
]

asset_path = PathJoinSubstitution([
FindPackageShare('int-ball2_isaac_sim'),
FindPackageShare('ib2_isaac_sim'),
'assets',
LaunchConfiguration('usd_file')
])
Expand All @@ -48,6 +69,9 @@ def generate_launch_description():
'install_path': LaunchConfiguration('isaac_path'),
'gui': asset_path,
'play_sim_on_start': LaunchConfiguration('play_on_start'),
'use_internal_libs': LaunchConfiguration('use_internal_libs'),
'dds_type': LaunchConfiguration('dds_type'),
'ros_distro': LaunchConfiguration('ros_distro'),
}.items()
)

Expand Down