ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

Mounting Robot Arm From Ceiling

asked 2019-04-25 09:55:10 -0500

jbeck28 gravatar image

I'm toying with the idea of a ceiling mounted robot arm, and I'm curious what the best way is to change the link to the world frame to represent this most accurately in RViz? I've read something about a top-level xacro file, so I can make changes to a robot model without changing the underlying URDF in the fanuc package I'm using. Any info on best practices for this, or how to get the robot to appear upside down, with its mount somewhere other than the origin of the world frame would be helpful,

Thanks, Josh

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
5

answered 2019-04-25 09:58:30 -0500

gvdhoorn gravatar image

updated 2019-04-26 09:29:44 -0500

This would be no different from mounting your robot model as you would do it normally "on the floor".

Create a new .xacro file, import the robot macro .xacro as you'd normally do.

Then create the fixed joint that you'd normally create to place the robot in your scene, but instead of using an identity transform (ie: xyz="0 0 0" rpy="0 0 0") specify a Z-offset (to translate it "into the air"), then rotate it over either the Y or the X axis by 180 degrees and make the robot's base_link the child frame.

Example:

<?xml version="1.0" ?>
<robot name="upside_down_m10ia" xmlns:xacro="http://wiki.ros.org/xacro">
  <xacro:include filename="$(find fanuc_m10ia_support)/urdf/m10ia_macro.xacro"/>
  <xacro:fanuc_m10ia prefix="robot_"/>

  <link name="world" />
  <joint name="ceiling_joint" type="fixed">
    <origin xyz="0 0 2" rpy="0 ${radians(180)} 0" />
    <parent link="world" />
    <child link="robot_base_link" />
  </joint>
</robot>

In RViz, this would look like this (after setting the Fixed Frame setting to world):

inverted m10ia

Note how world has positive X pointing "away" from the robot. That is because I rotated 180 degrees over Y. If you don't like that, you could add an additional intermediate frame or an add an additional rotation.

Any info on best practices for this, or how to get the robot to appear upside down, with its mount somewhere other than the origin of the world frame would be helpful,

Note btw that if you've been using the provided top-level .xacro files in the Fanuc support packages then those robots are not "mounted", but the kinematic chain just starts at the base_link of the robot. And as there is nothing else, that automatically becomes the root of your world.


Edit: you might want to add an additional tool frame that is rotated such that Z+ is again "up", instead of down (as it would be because of the ceiling mount).

It's not required, but might be nice.

edit flag offensive delete link more

Comments

Thank you very much for your thorough response, much appreciated. However, implementing the changes you mentioned does not impact the robot model, and when I convert the .xacro to a URDF as a simple check, the link and joint added after the include line does not appear in the generated URDF file. I must be doing something wrong, any idea?

jbeck28 gravatar image jbeck28  ( 2019-04-26 08:39:00 -0500 )edit

I must be doing something wrong, any idea?

It sounds like you don't have your Fixed Frame set to the world frame.

gvdhoorn gravatar image gvdhoorn  ( 2019-04-26 08:57:07 -0500 )edit

How would I modify that? I just realized the robot appears correctly (upside down) in setup assistant.

jbeck28 gravatar image jbeck28  ( 2019-04-26 09:28:27 -0500 )edit

How would I modify that?

It's an RViz configuration option. In the Displays panel, under Global Options.

gvdhoorn gravatar image gvdhoorn  ( 2019-04-26 09:30:39 -0500 )edit

Did this work for you in the end?

gvdhoorn gravatar image gvdhoorn  ( 2019-05-02 09:43:34 -0500 )edit

Sorry I never replied, this worked perfectly, Thank you very much for your assistance!

jbeck28 gravatar image jbeck28  ( 2019-05-22 12:29:39 -0500 )edit

Question Tools

Stats

Asked: 2019-04-25 09:55:10 -0500

Seen: 874 times

Last updated: Apr 26 '19