0
$\begingroup$

Rosanswers logo

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?


Originally posted by Zenzu on ROS Answers with karma: 28 on 2022-04-26

Post score: 0


Original comments

Comment by aarsh_t on 2022-04-26:
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.

Comment by Zenzu on 2022-04-26:
@aarsh_t and for creating a link between these two models, can I just use a static publisher?

Comment by aarsh_t on 2022-04-26:
yes, you can use static publisher to create the link between them.

Comment by gvdhoorn on 2022-04-26:
@aarsh_t: how would consumers of robot_description know they would also need to load/parse world_description?

Comment by aarsh_t on 2022-04-26:
I did not understand what you mean by the consumer of robot_description?

Comment by gvdhoorn on 2022-04-26:
RViz, MoveIt, robot_state_publisher, joint_state_publisher, ros_control nodes, etc.

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

Comment by aarsh_t on 2022-04-26:
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.

Comment by Zenzu on 2022-04-28:
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.

Comment by aarsh_t on 2022-04-28:
Well you did not mentioned anything about addition of the second robot in the question. So I tried to answer according to the question.

I worked with 2 UR arms on the bit old machine with 8gb ram, no external graphic cards, intel i5 6th gen with Ubuntu running on the external SSD. I had the significant delays. But if you have high PC specs the delay should be much less I guess.

For using 2 robots, there are basically 2 Ideas that came into my mind,

  1. Combine both robot's urdf to one. It does the trick but I really don't like it. It makes your package less modular.

  2. Use namespaces. This is what I adapted for my project. I had spent good amount of time to configure the robot as the robot was quite new, I only had (almost completed) urdf and I adapted from there to configure the moveit and all. I want to make small tutorial on that as I really liked the project but just looking for some right time haha.

Comment by Zenzu on 2022-04-28:
I am sorry for misunderstanding. I do not have two robots, just two robot descriptions (of course with different names). The first one is Franka Emika and the second one is only the table with other static objects. In order to visualize both of them at once without changing the original package, I have added two 'Robot model' plugins within Rviz, one for each robot descriptions.

Comment by aarsh_t on 2022-04-28:
Can I ask what is your PC specs? Are you running the virtual machine?

Comment by Zenzu on 2022-04-29:
I am running desktop Ubuntu and my specs are: 32GB RAM, i7-11700K, Geforce 1050Ti

Comment by aarsh_t on 2022-04-29:
Well that should be enough I guess! I have no further idea about the delay. but I am sure it is not the loading of the 2nd urdf file. Because I have worked with multirobot with quite a lot of topics at a good frequency on almost similar machine as yours. Did you faced delay while launching only one arm and try planning?

Comment by Zenzu on 2022-04-29:
Ok I have found the reason. The delay is caused by choosing the fixed frame in Rviz. If the fixed frame is panda_link0 everything is smooth, but as soon the fixed frame is table or world frame (frames published by static publisher) everything is delayed.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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


Originally posted by Zenzu with karma: 28 on 2022-04-29

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.