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

[Question] Question on Setting up the camera on robot head, but the pose is not as what I have setting #1437

Open
cidxb opened this issue Nov 19, 2024 · 1 comment

Comments

@cidxb
Copy link

cidxb commented Nov 19, 2024

Question

I am using isaac Sim 4.2.0.2 and omni-isaac-lab 0.24.19

I was using the following code for setting up a camera on my robot's head

@configclass
class TableSceneCfg(InteractiveSceneCfg):
    """Scene configuration with robot, table, and objects."""
    camera = CameraCfg(
        prim_path="{ENV_REGEX_NS}/Robot/head_Link/front_cam",
        update_period=0.1,
        height=720,
        width=1280,
        data_types=["rgb", "distance_to_image_plane"],
        spawn=sim_utils.PinholeCameraCfg(
            focal_length=24.0,
            focus_distance=400.0,
            horizontal_aperture=20.955,
            clipping_range=(0.1, 1.0e5),
        ),
        offset=CameraCfg.OffsetCfg(
            rot=(0.12279, 0.69636, -0.12279, 0.69636),  
            pos=(-0.1, 0.0, 0.0),
            convention="ros",
        ),
    )

The rotation value acquired first by using the slider inside the simulation , and I adjust the value slider to suitable pose and marked it down. But after I filled the value up on the cfg. When I got inside the sim ,the value still not as what as I set.

Should I do a some what operation similar to robot.write_joint_state_to_sim(joint_pos, joint_vel)?

Since I found out that, for robot , if I want the initial joint set as the value in ArticulationCfg, I must do a such operation first to reset it before the simulation (B.T.W, I am also not sure, if this the correct usage, I do learn it from examples which they use it inside the simulation loop as reset procedure, but not before it. But if I don't reset it first, the simulation will start from 0 point and slowly move to the initial pose, which is not desired).

Wish someone has solution or experience on it.

Thanks ahead for kindly help from the community.
Hat tip to you!

@RandomOakForest
Copy link
Collaborator

RandomOakForest commented Nov 21, 2024

Thank you for posting this. Maybe you forgot to do a sim.reset() as explained in this tutorial.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants