Home | Tutorials | Wiki | Issues
Ask Your Question
0

How to achieve planar joint?

asked 2018-10-09 10:34:23 -0500

kumpakri gravatar image

updated 2018-10-09 10:37:09 -0500

I need to define a joint that is moving in x-y plane but is fixed in z plane. On ROS wiki page, there is a list of joints, which says a planar type of joint can be defined, but if I run the model in Gazebo simulation, it says the type of joint is unknown.

[ WARN] [1539099575.602332867]: Converting unknown joint type of joint 'joint_planar' into a fixed joint

I have defined two link each of which I assigned a prismatic joint, one in y axis, the other in x axis. If I could somehow use one mesh for the both links, it would be sufficient, but I can't imagine how could that be possible.

I need a way how to make my mesh element move in plane in Gazebo simulation. How can I do that?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-10-11 02:21:15 -0500

Duckfrost gravatar image

Hi,

I give you here two ways that you could achive a "plannar like" movement:

1) With two primsatic joints in tandem 2) With a plugin that taps into the speed of an object that moves on the plane

I leave you here with the CodeGit for each one, a Video explaining all the process and a ROSJECT with the code ready to go.

1) Two prismatic Joints:

The URDF that we spawn that has the two prismatic joints and at the end the elemnt that you want to move in the plane: ( Its a urdf but because of the platform limitations it had to have the sdf extension) plannar_mover.urdf

The launch files to spawn the URDF and the empty world:

C:\fakepath\kinetic_main.launch

C:\fakepath\spawn_with_controlers_plannar_mover.launch

C:\fakepath\spawn_robot_urdf.launch

C:\fakepath\spawn_plannar_mover.launch

C:\fakepath\plannar_mover_control.launch

C:\fakepath\plannar_mover_empty.world

The main disavantage of this method is that you have phisical elements moving, which give always problems and worst is that prismatic joints don't behave very well, they bend and do some strange stuff. Sure that if you play around with the weights and physical properties of the links you can improve the performance.

image description

2) Create a plugin and add seting speed capabilities to any model that has this plugin:

This is in my opinion the method that works best, the only downside is that the model has to have zero friction with the ground or it has to have some kind of wheels to avoid it flipping.

This is the code for the model plugin:

C:\fakepath\plannar_mover.cpp

The world with the plugin in a box dummy model:

C:\fakepath\plannar_mover.world

And the launch file for it:

C:\fakepath\kinetic_main_v2.launch

image description

Hope it helped ;).

edit flag offensive delete link more

Comments

Thank you! I appreciate your help a lot. First when I laid my eyes on the first variant I facepalmed myself. Of course that is a possible solution. Just attach one prismatic joint to another. This is genius. Sadly, due to some, I guess, gazebo bug (as you mentioned in the video the planar movement is flawed), this solution didn't work for my use case. I didn't fully explain what I want to do with the link moving in plane.

kumpakri gravatar imagekumpakri ( 2018-10-11 08:13:15 -0500 )edit

In my case, I have a robot with a case that is supposed to work as a bumper. So the case encapsulates the robot and if the robot hits a wall, the case moves with respect to the robot and springs the robot back.

kumpakri gravatar imagekumpakri ( 2018-10-11 08:18:18 -0500 )edit

When I tried to attach the case to two planar joints in tandem, first I thought the y_axis_link would need its collision element to interact with obstacles at sides of the robot and the collision element of the x_axis_link needs to interact with obstacles in front and at back of the robot. The x_axis_link holding the case mesh would be attached to the y_axis_link, so they won't be able to move in the y axis with respect to each other. This assumption was wrong.

kumpakri gravatar imagekumpakri ( 2018-10-11 08:22:30 -0500 )edit

However, if I let the collision element of the x_axis_link to interact with all the obstacles from all direction, the case does behave like a bumper, so the goal was reached. And when I think about it, it does make sense for the links to behave this way. I just don't understand how can x_axis_link move in y direction wtr to y_axis_link if the x_axis_link is attached to the y_axis_link with the prismatic joint in the x axis. Thank you one more time!

kumpakri gravatar imagekumpakri ( 2018-10-11 08:26:28 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2018-10-09 10:34:23 -0500

Seen: 63 times

Last updated: Oct 11