How to make imported urdf to move?

any directions?

Hi @Andrey1984

There are several approaches, included in the latest documentation, such as…

@toni.sm
Thanks
Could you extend where to put the code
so the imported urdf would move like the animated example as per https://docs.omniverse.nvidia.com/app_isaacsim/app_isaacsim/tutorial_required_adding_controller.html ? 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[0] = ((2 * command[0]) - (command[1] * self._wheel_base)) / (2 * self._wheel_radius)
        joint_velocities[1] = ((2 * command[0]) + (command[1] * 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

isaac_sim_control_robot_1

where to start to get own imported model to move like

https://docs.omniverse.nvidia.com/app_isaacsim/app_isaacsim/tutorial_required_hello_robot.html#move-the-robot

?

@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
https://docs.omniverse.nvidia.com/app_isaacsim/app_isaacsim/tutorial_ros_turtlebot.html

Specifically its setting the joint drive mode to velocity for any driven wheels.
You can also look at 1. Assemble a Simple Robot — Omniverse Robotics documentation for more information on configuring joint drives.