Coder Social home page Coder Social logo

Comments (17)

azeey avatar azeey commented on September 27, 2024 1

Would the Actuators message work? https://github.com/gazebosim/gz-msgs/blob/gz-msgs10/proto/gz/msgs/actuators.proto

from gz-sim.

bperseghetti avatar bperseghetti commented on September 27, 2024 1

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.

scpeters avatar scpeters commented on September 27, 2024 1

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.

bperseghetti avatar bperseghetti commented on September 27, 2024 1

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.

PerFrivik avatar PerFrivik commented on September 27, 2024

@mjcarroll I was wondering if you maybe know more about this?

from gz-sim.

azeey avatar azeey commented on September 27, 2024

@scpeters any thoughts?

from gz-sim.

PerFrivik avatar PerFrivik commented on September 27, 2024
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.

azeey avatar azeey commented on September 27, 2024

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.

PerFrivik avatar PerFrivik commented on September 27, 2024

@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.

PerFrivik avatar PerFrivik commented on September 27, 2024

Any updates on this? @azeey sorry for the constant tagging, I just really need this done for a project.

from gz-sim.

azeey avatar azeey commented on September 27, 2024

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.

PerFrivik avatar PerFrivik commented on September 27, 2024

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.

azeey avatar azeey commented on September 27, 2024

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.

PerFrivik avatar PerFrivik commented on September 27, 2024

"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.

azeey avatar azeey commented on September 27, 2024

In that case, yes, I think we'd welcome a PR. Thanks for your patience.

from gz-sim.

PerFrivik avatar PerFrivik commented on September 27, 2024

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.

PerFrivik avatar PerFrivik commented on September 27, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.