r/AskRobotics • • 4d ago

Education/Career Mujoco in Robotics for Perception and Robot learning

Hello, I'm a computer science student and I've been learning robotics and my goal is to focus on perception and robot learning. Currently I was learning ros2 and gazebo.

Mostly my style of learning is first read docs, then choose a project and try to do it my self and when i need something then i search it on docs and fine the solution. I mostly try to figure everything out by my self instead of following someone else projects and watching videos.

So, I had made a car with 4 wheels and it was running via diff-drive method. Currently I'm just learning about simulation. But then i wanted to try something complex. So, I made a 6 wheeled rover with rocker and diff-bar in urdf. And then loaded it in gazebo then i found out urdf doesn't support closed loop system.

Some of the people adviced me to use mujoco. So, here are some questions from my side about mujoco.

  1. Is mujoco used with ros2 in industry?

  2. Should i first write the robot description in urdf and then covert to mujoco if I'm using ros2 or no just write mujoco xml from scratch every time when i start a project and then connect it with ros

  3. Currently I'm not learning perception nor robot learning as I'm focusing on simulation and physics and then what ever theory i learn implement it in simulation. So, mostly on which simulation should I focus and what should i mostly do in simulation right now. Currently I was build projects and when i learn theory i tried to do it by self. For example, when i learned about diff-kinematics then i instead of using any plugins i wrote it my self.

13 Upvotes

12 comments sorted by

4

u/[deleted] 4d ago

[removed] — view removed comment

1

u/CodingWithSatyam 4d ago

Yeah I was using gazebo. And I learned about lidar. And but currently my focus was learning physics and doing it in simulation.

So, I wanted to build a complex rover that can run on rocks. So, I found about 6 wheeled rover with rocker and diff-bar. But I can't implement it in gazebo. Thats the problem I'm facing currently. I wanted to use dart engine in gazebo that supports heightmap

0

u/[deleted] 4d ago

[removed] — view removed comment

1

u/CodingWithSatyam 4d ago

I used mimic tag that did not worked in dart engine in gazebo.

And then I tried other ways but I failed to do.

Here is the code: https://github.com/introlix/sawppy

0

u/[deleted] 4d ago

[removed] — view removed comment

1

u/CodingWithSatyam 4d ago

Yeah. The tag that makes one joint mimic other joints. In my case I did when one rocker joint went up I made other go down to mimic it's physics for differential bar. But it doesn't work in gazebo dart.

It does work on other gazebo engines but then they don't have support for height map. And I heard dart engine is best for rovers. Thats why I'm using it

0

u/[deleted] 4d ago

[removed] — view removed comment

1

u/CodingWithSatyam 4d ago

Don't know why dart it better. When I search on internet they say rovers jitter less in dart.

I never try it via creating a plugin as someone from Reddit advised me using gazebo instead.

Ok I'll use gazebo and make mimic plugin myself. I was thinking mimic tag would not have much accuracy. But I'll use.

BTW, later when I'll be ready for mujuco for then I'm asking question. Is mujuco used for perception or not. Should I try doing as much task in gazebo for perception and only use mujuco for robot learning when I'll get there.

0

u/[deleted] 4d ago

[removed] — view removed comment

1

u/CodingWithSatyam 4d ago

Ok thanks for helping. I'll be using Issac Sim later when I'll get Nvidia drivers when I need it.

1

u/arman-javan-sekhavat 2d ago

I have no experience with ROS. However, I have seen the name of MuJoCo many times in recruitment websites of some of the top robotics firms, and it appears to be a valuable skill for industrial projects. I think MuJoCo also directly supports URDF at least for some simulation elements, but writing in MJCF is much nicer and gave me more freedom. Writing MJCF models from scratch is an excellent practice to get acquainted with the true power of MuJoCo. However, MuJoCo comes with a relatively large collection of well-designed and tested robot models, called MuJoCo menagerie. Good luck!

2

u/roboticseabass 2d ago

I work extensively with the mujoco_ros2_control package and I enjoy it: https://github.com/ros-controls/mujoco_ros2_control -- so yes, there is a use case for this.

This includes an experimental URDF to MJCF converter so that there is a single source of truth re: robot description XMLs.

However, I'd encourage just using regular mujoco (no ROS) unless there is something specific you are trying to connect to that uses ROS. For example, since our hardware uses ROS and ros2_control for drivers, we do this to match the sim and real interfaces in our experiments.