Comments (17)
Would the Actuators
message work? https://github.com/gazebosim/gz-msgs/blob/gz-msgs10/proto/gz/msgs/actuators.proto
from gz-sim.
Awesome! Thank you for your help :). Do you have any preference on what message type I should use for this? I think if we make something new or use something existing, we should make sure that the message type can get reused in other plugins, like differential drive, or Ackermann too. Or if required, make separate message types.
I would suggest actuators msg as that is already used across most "drive" plugins and eliminates the painful need for super specific joint/entity names otherwise.
from gz-sim.
Ah, so the mecanum force logic, is already built into gazebo.
Sorry I'm late to this discussion. Yes, the mecanum force logic is encoded within a given model's friction parameters:
- //surface/friction/ode/mu
- //surface/friction/ode/mu2
- //surface/friction/ode/fdir
- //surface/friction/ode/fdir/@gz:expressed_in
See examples/worlds/mecanum_drive.sdf for an example. I need to write a tutorial to explain how these parameters all work together
So if I simulate a rover and use 4 JointControllers, and use my custom mecanum inverse kinematics to control the 4 individual motors, the rover will behave like a mencaum rover even if I don't have the mecanum plugin in the sdf?
yes, this should be the case
from gz-sim.
Ah, so the mecanum force logic, is already built into gazebo.
Sorry I'm late to this discussion. Yes, the mecanum force logic is encoded within a given model's friction parameters:
- //surface/friction/ode/mu
- //surface/friction/ode/mu2
- //surface/friction/ode/fdir
- //surface/friction/ode/fdir/@gz:expressed_in
See examples/worlds/mecanum_drive.sdf for an example. I need to write a tutorial to explain how these parameters all work together
So if I simulate a rover and use 4 JointControllers, and use my custom mecanum inverse kinematics to control the 4 individual motors, the rover will behave like a mencaum rover even if I don't have the mecanum plugin in the sdf?
yes, this should be the case
This means you can just link it up from the Actuators
message to control each joint.
from gz-sim.
@mjcarroll I was wondering if you maybe know more about this?
from gz-sim.
@scpeters any thoughts?
from gz-sim.
Screencast.from.15.12.2023.15.04.14.webm
Any updates? I am really confused on how this plugin works, I even swapped the spheres for cylinders and it works. But I see no forces applied to any body? Just pure wheel speeds.
from gz-sim.
It works using the same principle as tracked vehicles (see https://arxiv.org/pdf/1703.04316.pdf) where the desired velocity is part of the constraints on a contact point, in addition to normal force and friction. The constraint solver is asked to satisfy this desired velocity so it will apply the necessary force on the wheels. This is a much more efficient way of modelling tracked vehicles and mecanum wheels than simulating the individual wheels. At least for tracked vehicles, we've tried in the past to simulate individual wheels, and while it works, the performance drops due to the sheer number of contacts to process.
from gz-sim.
@azeey, thank you for your recent clarifications! They were really helpful. Could you please guide me to where I can find these equations in our codebase? I'd like to take a closer look.
Additionally, I wanted to come back to the feature I proposed earlier. Would you consider this feature beneficial and something you would consider merging if I implemented it? I am trying to implement a mecanum rover in PX4, but I want the controller to output the wheel speeds, that's why I would like to control the wheels directly, instead of the linear- and yaw velocity.
from gz-sim.
Any updates on this? @azeey sorry for the constant tagging, I just really need this done for a project.
from gz-sim.
Any updates on this? @azeey sorry for the constant tagging, I just really need this done for a project.
If you want to control the velocities of each joint, we already have the JointController
system. Can you not use that? It has topics for each wheel and can be set up to use velocity or force mode. Alternatively, it can use actuator messages to control all wheels with a single topic.
from gz-sim.
Ah, so the mecanum force logic, is already built into gazebo. So if I simulate a rover and use 4 JointControllers, and use my custom mecanum inverse kinematics to control the 4 individual motors, the rover will behave like a mencaum rover even if I don't have the mecanum plugin in the sdf?
from gz-sim.
No, I thought you meant you'd model the wheels of a mecanum wheel. So are you asking about extending the Mecanum plugin so it accepts joint velocities as an alternative to cmd_vel, but still uses the current velocity constraint based approach to actually move the robot?
from gz-sim.
"extending the Mecanum plugin so it accepts joint velocities as an alternative to cmd_vel, but still uses the current velocity constraint based approach to actually move the robot"
This is exactly what I mean! Sorry for being unclear.
from gz-sim.
In that case, yes, I think we'd welcome a PR. Thanks for your patience.
from gz-sim.
Awesome! Thank you for your help :). Do you have any preference on what message type I should use for this? I think if we make something new or use something existing, we should make sure that the message type can get reused in other plugins, like differential drive, or Ackermann too. Or if required, make separate message types.
from gz-sim.
Ah, so the mecanum force logic, is already built into gazebo.
Sorry I'm late to this discussion. Yes, the mecanum force logic is encoded within a given model's friction parameters:
- //surface/friction/ode/mu
- //surface/friction/ode/mu2
- //surface/friction/ode/fdir
- //surface/friction/ode/fdir/@gz:expressed_in
See examples/worlds/mecanum_drive.sdf for an example. I need to write a tutorial to explain how these parameters all work together
So if I simulate a rover and use 4 JointControllers, and use my custom mecanum inverse kinematics to control the 4 individual motors, the rover will behave like a mencaum rover even if I don't have the mecanum plugin in the sdf?
yes, this should be the case
Ohh, awesome! I was quite confused, but now it makes sense! Thank you, but then I don't need to make the PR, I can just use 4 joint controllers and leave away the mecanum plugin.
Also, yes a video would be awesome, I think it would help a lot of beginners (like me :D) and save you guys some time.
Thank you for the help guys, I really appreciate it!
from gz-sim.
Related Issues (20)
- Regression in Resource Spawner in Harmonic HOT 1
- Worlds in quick start on Harmonic contains ignition plugins and crashes with ambiguous errors HOT 3
- Tracked Vehicle example issue HOT 2
- Fortress in WSL2 terminated on opening due to Ogre error HOT 2
- TrackedVehicle system does unexpected movement on low turn commands. HOT 2
- Crash after dynamically adding plugin AckermannSteering HOT 1
- Crash after dynamically adding plugin LiftDrag to non-existing entity
- Harmonic crashes when i try to open a project HOT 8
- Crash after dynamically adding plugin LinearBatteryPlugin to non-existing entity HOT 1
- Crash after dynamically adding plugin DiffDrive to non-existing entity HOT 1
- Crash after dynamically adding plugin MecanumDrive to non-existing entity HOT 1
- OdometryPublisher xyz_global_offset, rpy_global_offset HOT 3
- Failed to load system plugin [libgz-sim8-python-system-loader-system.so] : Could not find shared library. HOT 3
- [OdometryPublisher] Crash if initialized with zero gaussian noise standard deviation HOT 1
- Spring-damper prismatic joint system plugin HOT 2
- Gazebo goes not responding after loading the window HOT 5
- Friction does not work on heightmaps and mesh terrain [Harmonic] HOT 1
- Ackermann Steering 'Turning Radius' Confusion
- Crash after calling /model/elevator/door_0/lidar topic with empty gz.msgs.LaserScan message
- Setting multiple light properties using `sim::Light` doesn't work properly
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gz-sim.