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

Overwrite robot_description

asked 2022-04-26 03:55:42 -0500

Zenzu gravatar image

Hi, I am using the original franka_ros packages (that I do not want to modify) with my custom packages. My problem is that the original franka_control.launch file loads the panda's urdf as the robot_description parameter, however, I want to add other components within a scene such as table, etc. I have two ideas how can I add these components but I am not sure, which one is better or what is the correct way of doing it.

A) Overwrite the original robot_description with these commands:

  <!-- Overwrite panda description with panda_on_table description -->
  <arg default="$(find franka_mis_description)/urdf/table_mis.xacro" name="model"/>
  <param command="$(find xacro)/xacro $(arg model)" name="robot_description"/>

Do I need to load robot_state_publisher and joint_state_publisher again?

B) Is there a way to extend the loaded robot_description with another urdf file?

edit retag flag offensive close merge delete

Comments

2

You can always add new models with urdf file to visualize in the rviz or use it somewhere else. To do that create new urdf file with the required models in the world. What you can do is to use another parameter name instead of the robot_description

<arg default="$(find franka_mis_description)/urdf/table_mis.xacro" name="model"/>
<param command="$(find xacro)/xacro $(arg model)" name="world_description"/>

now you can also add this model in rviz as well.

aarsh_t gravatar image aarsh_t  ( 2022-04-26 04:29:24 -0500 )edit

@aarsh_t and for creating a link between these two models, can I just use a static publisher?

Zenzu gravatar image Zenzu  ( 2022-04-26 07:24:41 -0500 )edit

yes, you can use static publisher to create the link between them.

aarsh_t gravatar image aarsh_t  ( 2022-04-26 09:08:10 -0500 )edit

@aarsh_t: how would consumers of robot_description know they would also need to load/parse world_description?

gvdhoorn gravatar image gvdhoorn  ( 2022-04-26 09:40:26 -0500 )edit

I did not understand what you mean by the consumer of robot_description?

aarsh_t gravatar image aarsh_t  ( 2022-04-26 09:48:41 -0500 )edit

RViz, MoveIt, robot_state_publisher, joint_state_publisher, ros_control nodes, etc.

Basically nodes who would want to 'read' the robot_description parameter.

gvdhoorn gravatar image gvdhoorn  ( 2022-04-26 09:59:42 -0500 )edit

Okay, I might not have solution for all because I haven't faced all the need but for rviz, you can add new robotModel. Also I think you can create static transformation to get the tf to use it further. But as far as I understand, he only need to add the static things in the environment. So I am not sure if he need the Moveit or ros_control.

If You need to use moveit and the ros_control, you can use namespaces to load robot_description. I have recently used 2 UR arms simultaneously with the moveit and ros_control. It was quite good learning experience but I still have to make good tutorial from it so I can share it with the community.

aarsh_t gravatar image aarsh_t  ( 2022-04-26 14:03:14 -0500 )edit

Thank you, it worked to some extent, however, when I have two robot models visualized in Rviz, Panda's model has a huge delay in terms of visualization. Is there a way how to handle it? I tried to decrease the robot_state_publisher for the table model but it is not helping.

Zenzu gravatar image Zenzu  ( 2022-04-28 10:51:56 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-04-29 05:52:33 -0500

Zenzu gravatar image

I have solved it by loading the second robot_description with a different name and creating links between these two models using tf2_static_publisher. I would like to thank @aarsh_t

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2022-04-26 03:55:42 -0500

Seen: 369 times

Last updated: Apr 29 '22