There are several approaches, included in the latest documentation, such as…
the Isaac Sim’s extensions
and the tutorial for mobile robots
or both types
Isaac SDK Bridge
Could you extend where to put the code
so the imported urdf would move like the animated example as per 5. Adding A Controller — Omniverse Robotics documentation ? It lists the code but doesn’t illustrate where exactly to appl ythe code. Is it supposed to be executed from terminal ? python2? python3? or needs to be loaded into the isaac omniverse sim somehow? how exactly? will it work with custom urdf or with default kaya model only?
Specifically where do I put the code below
in order to get custom imported urdf to move like in the gif attached?
from omni.isaac.examples.base_sample import BaseSample from omni.isaac.jetbot import Jetbot from omni.isaac.core.utils.types import ArticulationAction from omni.isaac.core.controllers import BaseController import numpy as np class CoolController(BaseController): def __init__(self): super().__init__(name="my_cool_controller") # An open loop controller that uses a unicycle model self._wheel_radius = 3 self._wheel_base = 11.25 return def forward(self, command): # command will have two elements, first element is the forward velocity # second element is the angular velocity (yaw only). joint_velocities = [0.0, 0.0] joint_velocities = ((2 * command) - (command * self._wheel_base)) / (2 * self._wheel_radius) joint_velocities = ((2 * command) + (command * self._wheel_base)) / (2 * self._wheel_radius) # A controller has to return an ArticulationAction return ArticulationAction(joint_velocities=joint_velocities) class HelloWorld(BaseSample): def __init__(self) -> None: super().__init__() return def setup_scene(self): world = self.get_world() world.scene.add_default_ground_plane() jetbot_robot = world.scene.add(Jetbot(prim_path="/World/Fancy_Robot", name="fancy_robot")) return async def setup_post_load(self): self._world = self.get_world() self._jetbot = self._world.scene.get_object("fancy_robot") self._world.add_physics_callback("sending_actions", callback_fn=self.send_robot_actions) # Initialize our controller after load and the first reset self._my_controller = CoolController() return def send_robot_actions(self, step_size): #apply the actions calculated by the controller self._jetbot.apply_wheel_actions(self._my_controller.forward(command=[20.0, np.pi/ 4])) return
where to start to get own imported model to move like
@Andrey1984 I would recommend going through the full set of required tutorials. That will better explain where to add your controller to.
This ROS tutorial will explain how to import and configure the robot for control
Specifically its setting the joint drive mode to velocity for any driven wheels.
You can also look at 3. Simple Robot — Omniverse Robotics documentation for more information on configuring joint drives.