So I followed the first two ros2 tutorials along with some other resources and was able to get my ackermann robot to listen to twist messages and calculate steering angles using the AckermannSteering omnigraph node, then using two articulation controllers write rear velocity directly from the twist message, and steering position from the AckermannSteering. With angular position and velocity from the twist message I’m able to get the robot to steer and the rear tires to start spinning, however, the tires should have yaw movements based on commands and freely rotate in the pitch, which they don’t. Assume the roll pitch yaw is for the tire:
When I send drive commands, it’s as if the front tires have very high friction with the ground. I did follow the advice here and set 10000, 0 stiffness and damping for position commands respectively and 0, 10000 for velocity commands based on another example I saw which I can’t find right now.
I’m wondering if I need to add another joint that is not a drive joint between the steering link and the tire to allow for free movement of the tire. Or is there something I can do with the frictions?
P.S. the help link for the AckermannSteering omnigraph node is broken.
So I created a new URDF where I added a steering hinge between the base_link and each front tire.
Now when I import both robots and setup an ActionGraph for each, the previous one still does the same, where it moves the rear tires and I can give steering to the front ones, but the front tires aren’t spinning along the movement axis. And the new robot starts moving a little forward, then completely stops. This series of movements for the new robot is completely independent of whatever commands I send to it.
For the new urdf:
I have setup stiffness and damping for each velocity/position joint according to this.
I added a PhysicsMaterial according to this and connected all 4 tires to it and played around with friction values and nothing changed the behaviour. It also looks like the new setup isn’t listening to the commands at all.
Added a scene (in my case the warehouse with forklifts)
Opened the URDF importer extension Isaac Utils > Workflows > URDF Importer
Unchecked clear stage
Unchecked Fix Base Link (Since my robot is a mobile robot)
Changed Joint Drive to Velocity
Located the URDF file in Input File
I specified an Output Directory
I fixed the masses for the meshes as they weren’t imported properly from the URDF
Following the instruction here I added an Articulation Root to the base of the robot with all the joints connected to it by clicking on the USD, then clicking +Add in the Property Tab, and added Physics > Articulation Root.
Then I changed the stiffness and damping of all joints, based on whether they are position or velocity controlled according to this.
From the hinge_to_tire joints for the front wheels, I removed the Drive Property from the joints I wanted to move freely thanks to this post
Followed all the steps mentioned here to build an ActionGraph. My robot was Ackermann drive so instead of using the Differential Controller I used the Ackermann Steering node and used two Articulation Controller nodes. One with position control for the steerings, and one with velocity control for the rear tires. For the Ackermann Steering I used the information from here to configure the omnigraph node to my robot’s setup.
At the end, I wrote a joy2twist node so that I can drive the robot around the sim.