Replies: 3 comments 2 replies
-
Thanks for posting this question. I'll move it to our Discussions section for the team to follow up. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Following up, have you tried changing the damping parameter? It is the damping what has an effect on velocity, not the stiffness. |
Beta Was this translation helpful? Give feedback.
1 reply
-
I think I had a similar issue, have you tried setting the velocity limit of the joints in the .usd file? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I loaded the TurtleBot3 Burger USD file from Isaac Sim Assets into Isaac Sim, then saved it in my lab workspace for training in Isaac Lab.
To control the two wheels using velocity control, I used DelayedPDActuatorCfg and set the velocity_limit to 6.4. However, as seen in the attached image, the wheel velocity significantly exceeds 6.4.
I tried setting stiffness to 0 and 40.0, but the results remained the same. I am not sure what the issue is.
In fact, to control my own two-wheel robot in Isaac Lab, I converted a URDF file from SolidWorks, then converted it to a USD file using Isaac Sim, and attempted to train it in Isaac Lab, but it did not work properly.
After multiple attempts without success, I tried using the TurtleBot3 Burger instead. However, I discovered that the TurtleBot3 Burger had a similar issue to my robot.
Below is my code.
from future import annotations
import torch
import math
from dataclasses import MISSING
import os
import isaaclab.sim as sim_utils
from isaaclab.assets import ArticulationCfg, AssetBaseCfg
from isaaclab.envs import ManagerBasedRLEnvCfg
from isaaclab.managers import CurriculumTermCfg as CurrTerm
from isaaclab.managers import EventTermCfg as EventTerm
from isaaclab.managers import ObservationGroupCfg as ObsGroup
from isaaclab.managers import ObservationTermCfg as ObsTerm
from isaaclab.managers import RewardTermCfg as RewTerm
from isaaclab.managers import SceneEntityCfg
from isaaclab.managers import TerminationTermCfg as DoneTerm
from isaaclab.scene import InteractiveSceneCfg
from isaaclab.sensors import ContactSensorCfg, RayCasterCfg, patterns
from isaaclab.terrains import TerrainImporterCfg
from isaaclab.utils import configclass
from isaaclab.utils.noise import AdditiveUniformNoiseCfg as Unoise
import isaaclab_tasks.manager_based.locomotion.velocity.mdp as mdp
from isaaclab.terrains.config.rough import ROUGH_TERRAINS_CFG
from isaaclab.actuators import (
ImplicitActuatorCfg,
DCMotorCfg,
IdealPDActuatorCfg,
DelayedPDActuatorCfg,
)
TWOWHEEL_CFG = ArticulationCfg(
spawn=sim_utils.UsdFileCfg(
usd_path=os.environ['HOME'] + "/IsaacLab/source/isaaclab_tasks/isaaclab_tasks/manager_based/locomotion/velocity/config/two_wheel/two_wheel_turtle.usd",
activate_contact_sensors=True,
rigid_props=sim_utils.RigidBodyPropertiesCfg(
disable_gravity=False,
retain_accelerations=False,
linear_damping=0.0,
angular_damping=0.0,
max_linear_velocity=1000.0,
max_angular_velocity=1000.0,
max_depenetration_velocity=1.0,
),
articulation_props=sim_utils.ArticulationRootPropertiesCfg(
enabled_self_collisions=False, solver_position_iteration_count=4, solver_velocity_iteration_count=0
),
),
init_state=ArticulationCfg.InitialStateCfg(
pos=(0.0, 0.0, 0.06082), # default: 0.0 0.0 0.2461942 0.33649
# pos=(0.0, 0.0, 0.33649),
joint_pos={
"wheel_left_joint": 0.0,
"wheel_right_joint": 0.0,
},
joint_vel={".": 0.0},
),
soft_joint_pos_limit_factor=0.8,
actuators={
"joints": DelayedPDActuatorCfg(
joint_names_expr=["."],
effort_limit=1.0,
velocity_limit=6.4,
min_delay=0, # physics time steps (min: 5.0 * 0 = 0.0ms)
max_delay=1, # physics time steps (max: 5.0 * 4 = 20.0ms)
stiffness={
"wheel_left_joint": 0.0,
"wheel_right_joint": 0.0,
},
damping={
"wheel_left_joint": 0.3,
"wheel_right_joint": 0.3,
},
friction={
"wheel_left_joint": 0.0,
"wheel_right_joint": 0.0,
},
armature={
"wheel_left_joint": 0.0,
"wheel_right_joint": 0.0,
},
),
# # "joints": FLAMINGO_JOINT_ACTUATOR_MLP_CFG,
# # "wheels": FLAMINGO_WHEEL_ACTUATOR_LSTM_CFG,
},
)
@configclass
class MySceneCfg(InteractiveSceneCfg):
"""Configuration for the terrain scene with a legged robot."""
@configclass
class CommandsCfg:
"""Command specifications for the MDP."""
@configclass
class ActionsCfg:
"""Action specifications for the MDP."""
@configclass
class ObservationsCfg:
"""Observation specifications for the MDP."""
@configclass
class EventCfg:
"""Configuration for events."""
@configclass
class RewardsCfg:
"""Reward terms for the MDP."""
# -- task
# 목표 속도를 잘 따라가면 보상
track_lin_vel_xy_exp = RewTerm(
func=mdp.track_lin_vel_xy_exp, weight=2.0, params={"command_name": "base_velocity", "std": math.sqrt(0.25)}
)# base_velocity 값과의 차이를 계산하여 보상을 부여
# "std": math.sqrt(0.25) : 속도 오차가 0.5 m/s 이하일 때 보상이 주어질 확률을 높이는 역할
track_ang_vel_z_exp = RewTerm(
func=mdp.track_ang_vel_z_exp, weight=1.0, params={"command_name": "base_velocity", "std": math.sqrt(0.25)})
@configclass
class TerminationsCfg:
"""Termination terms for the MDP."""
@configclass
class CurriculumCfg:
"""Curriculum terms for the MDP."""
@configclass
class TwowheelCfg(ManagerBasedRLEnvCfg):
"""Configuration for the locomotion velocity-tracking environment."""
Beta Was this translation helpful? Give feedback.
All reactions