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

Cannot get the effort display on Rviz to work.

asked 2020-05-28 05:40:34 -0600

Paco98 gravatar image

updated 2022-02-13 16:44:27 -0600

lucasw gravatar image

I'm trying to display the efforts like here http://wiki.ros.org/rviz/DisplayTypes.... To do this I publish the effort information in my /joint_states topic. On Rviz I have a robot visualization that is working perfectly. When I open the Rviz effort display and set it up, it says that the status is ok. It found the robot_description and that the display is receiving messages published to /joint_states:

What I see in Rviz

Yet under "Joints" I don't see any of the robot joints like on the website screenshot,

what I should see according to ros.org

and there are no efforts being displayed on my model (no circles with arrows). Has anyone gotten the effort display to work? I found a post from 2013 with the same problem: https://answers.ros.org/question/9922...

the joints on my URDF look like this:

<joint name="FLpitch_HJ" type="continuous">
    <parent link="FLpitch_T"/>
    <child link="flpitch_hj_endpoint"/>
    <axis xyz="1.0 0.0 0.0"/>
    <origin xyz="-3.58 0.19999999935024748 -0.0905"/>
</joint>

I tried adding:

<limit effort="30" velocity="1.0" lower="-2.2" upper="0.7" />

on every joint but It did not change things. Is this tag necessary for the Rviz display to work?

If I can provide any more information please let me know. I'm running ROS Melodic distro on a virtual machine with Ubuntu 18.04.

edit retag flag offensive close merge delete

Comments

Please attach your screenshots to the post directly, instead of linking to a 3rd party host. I've given you sufficient karma.

gvdhoorn gravatar image gvdhoorn  ( 2020-05-28 06:12:57 -0600 )edit

Something to check: does your .urdf has the effort attribute set on the limits of the joints?

gvdhoorn gravatar image gvdhoorn  ( 2020-05-28 06:16:30 -0600 )edit

@gvdhoorn my .urdf does not have an effort attribute set on the limits of the joints. I tried adding: <limit effort="30" velocity="1.0" lower="-2.2" upper="0.7" /> (where the values are random) for each joint, but saw no difference. Is this needed for it to work?

Paco98 gravatar image Paco98  ( 2020-05-28 09:51:01 -0600 )edit

Please attach your images directly to the question.

gvdhoorn gravatar image gvdhoorn  ( 2020-05-28 12:06:08 -0600 )edit

@gvdhoorn done.

Paco98 gravatar image Paco98  ( 2020-05-28 13:24:05 -0600 )edit

Was this ever resolved?

AdamGronewold gravatar image AdamGronewold  ( 2021-06-29 17:54:13 -0600 )edit

@AdamGronewold nope, in the end I gave up. I'd say the best best is to look into the rviz source code.

Paco98 gravatar image Paco98  ( 2021-06-30 03:09:28 -0600 )edit

Edit: moved this part to the answer below.


Edit: it looks like @rhaschke has added a send_efforts.py script to test whether the display works. @AdamGronewold: the robot used there (or at least: implied) is the Franka Emika Panda, which also has revolute joints.

You could adapt that script to test whether it works with whatever robot you're trying to visualise.

gvdhoorn gravatar image gvdhoorn  ( 2021-06-30 03:13:59 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2021-06-30 03:20:22 -0600

gvdhoorn gravatar image

updated 2021-06-30 03:28:04 -0600

Anecdotal and n==1, but the display does work, as I use it with several robots.

What I didn't notice at the time @Paco98 posted his question is that his joints are of type=continuous:

the joints on my URDF look like this:

<joint name="FLpitch_HJ" type="continuous">
    <parent link="FLpitch_T"/>
    <child link="flpitch_hj_endpoint"/>
    <axis xyz="1.0 0.0 0.0"/>
    <origin xyz="-3.58 0.19999999935024748 -0.0905"/>
</joint>

All my robots are revolute, and it would appear the Effort display does indeed filter out anything non-revolute (here):

for (std::map<std::string, urdf::JointSharedPtr>::iterator it = robot_model_->joints_.begin();
     it != robot_model_->joints_.end(); it++)
{
  urdf::JointSharedPtr joint = it->second;
  if (joint->type == urdf::Joint::REVOLUTE)
  {
    ...
  }
}

I don't know why exactly.

Looking at the rest of the code I'm not sure why REVOLUTE would be required. Perhaps it has something to do with how the arrows are positioned in the scene, but I really haven't tried to understand the code.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2020-05-28 05:40:34 -0600

Seen: 343 times

Last updated: Jun 30 '21