[Discourse.ros.org] [Quality Assurance] ROS tests with robot description

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[Discourse.ros.org] [Quality Assurance] ROS tests with robot description

ruffsl via ros-users


What is the best way to write tests that require a robot description? Are there any simple xacro files for testing or even a parametrizable robot description?

An example of such a test would be a ROS node which collects the current joint state and represents them in a model for use in a model view. This node requires the robot description to know about the available joints and then is updated frequently with joint_states messages.





---
[Visit Topic](https://discourse.ros.org/t/ros-tests-with-robot-description/5696/1) or reply to this email to respond.


If you do not want to receive messages from ros-users please use the unsubscribe link below. If you use the one above, you will stop all of ros-users from receiving updates.
______________________________________________________________________________
ros-users mailing list
[hidden email]
http://lists.ros.org/mailman/listinfo/ros-users
Unsubscribe: <http://lists.ros.org/mailman//options/ros-users>
Reply | Threaded
Open this post in threaded view
|

[Discourse.ros.org] [Quality Assurance] ROS tests with robot description

ruffsl via ros-users


This sounds like what [rostest](http://wiki.ros.org/rostest) is for.

If you're not aware, rostests are basically launch files, but launched by a special `roslaunch` wrapper that is specifically intended to be able to test nodes in a (mini) application context.

Populating the `robot_description` parameter (or any parameter really) is done in exactly the same way as you would in a regular launch file.

> This node requires the robot description to know about the available joints and then is updated frequently with joint_states messages.

The rostest could also start a second node that generates those joint states.





---
[Visit Topic](https://discourse.ros.org/t/ros-tests-with-robot-description/5696/2) or reply to this email to respond.


If you do not want to receive messages from ros-users please use the unsubscribe link below. If you use the one above, you will stop all of ros-users from receiving updates.
______________________________________________________________________________
ros-users mailing list
[hidden email]
http://lists.ros.org/mailman/listinfo/ros-users
Unsubscribe: <http://lists.ros.org/mailman//options/ros-users>
Reply | Threaded
Open this post in threaded view
|

[Discourse.ros.org] [Quality Assurance] ROS tests with robot description

ruffsl via ros-users


Yes I'm aware of rostest and also about the possibility of loading a robot_description via launch file.

However, what I'm looking for is some kind of "standard" robot description that can be used for testing.





---
[Visit Topic](https://discourse.ros.org/t/ros-tests-with-robot-description/5696/3) or reply to this email to respond.


If you do not want to receive messages from ros-users please use the unsubscribe link below. If you use the one above, you will stop all of ros-users from receiving updates.
______________________________________________________________________________
ros-users mailing list
[hidden email]
http://lists.ros.org/mailman/listinfo/ros-users
Unsubscribe: <http://lists.ros.org/mailman//options/ros-users>
Reply | Threaded
Open this post in threaded view
|

[Discourse.ros.org] [Quality Assurance] ROS tests with robot description

ruffsl via ros-users


My apologies. I'd somehow completely missed you were actually asking about/for a suitable xacro/urdf for testing, instead of how to test.

> Are there any simple xacro files for testing or even a parametrizable robot description?

I'm not entirely sure I understand what you are asking for, but nodes such as `joint_state_publisher` include a nr of small urdfs that are used in the tests that accompany it. See [ros/joint_state_publisher/joint_state_publisher/test](https://github.com/ros/joint_state_publisher/tree/dc9205b1b92d3d51351ab89ba2cb4536f1124114/joint_state_publisher/test). The test suite for `xacro` is another: [ros/xacro/test](https://github.com/ros/xacro/tree/0ae956da439bde5dc3fe19d9abc06c618a5ef6e9/test).





---
[Visit Topic](https://discourse.ros.org/t/ros-tests-with-robot-description/5696/4) or reply to this email to respond.


If you do not want to receive messages from ros-users please use the unsubscribe link below. If you use the one above, you will stop all of ros-users from receiving updates.
______________________________________________________________________________
ros-users mailing list
[hidden email]
http://lists.ros.org/mailman/listinfo/ros-users
Unsubscribe: <http://lists.ros.org/mailman//options/ros-users>
Reply | Threaded
Open this post in threaded view
|

[Discourse.ros.org] [Quality Assurance] ROS tests with robot description

ruffsl via ros-users
In reply to this post by ruffsl via ros-users


I am not sure if this is what you are looking for... but I created generic xacro files for testing description of different components in our lab.

I call this script with different parameters from a roslaunch test file. this is just test for parsing and if you want one can test also the description in rviz.

    <?xml version="1.0"?>
    <launch>
        <arg name="type" default="tools"/>
        <arg name="object_to_test" default="measurement_tool"/>

      <!-- send urdf to param server -->
      <param name="object_description" command="$(find xacro)/xacro --inorder '$(find iirob_description)/$(arg type)/urdf/$(arg object_to_test)/test_$(arg object_to_test).urdf.xacro'"/>

      <!-- robot state publisher -->
      <node pkg="robot_state_publisher" type="robot_state_publisher" name="tool_state_publisher">
          <param name="publish_frequency" type="double" value="50.0" />
          <remap from="robot_description" to="object_description" />
      </node>

      <node pkg="rviz" type="rviz" args="-d $(find iirob_description)/common/rviz/test_objects.rviz" name="test_objects" required="true">
      </node>

    </launch>

If you want to test robots with non-static joints you could use something like this:

    <?xml version="1.0"?>
    <launch>

      <arg name="pkg" default="iirob_kuka_bringup"/>
      <arg name="file_name" default="r5"/>

      <param name="robot_description" command="$(find xacro)/xacro --inorder '$(find iirob_kuka_bringup)/urdf/$(arg file_name).urdf.xacro'" />

      <node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" >
        <param name="use_gui" value="true"/>
      </node>

      <!-- robot state publisher -->
      <node pkg="robot_state_publisher" type="robot_state_publisher" name="tool_state_publisher">
          <param name="publish_frequency" type="double" value="50.0" />
      </node>

      <node name="test_robots" pkg="rviz" type="rviz" args="-d $(find iirob_description)/common/rviz/test_robots.rviz" />

    </launch>

I hope this can help you further....





---
[Visit Topic](https://discourse.ros.org/t/ros-tests-with-robot-description/5696/5) or reply to this email to respond.


If you do not want to receive messages from ros-users please use the unsubscribe link below. If you use the one above, you will stop all of ros-users from receiving updates.
______________________________________________________________________________
ros-users mailing list
[hidden email]
http://lists.ros.org/mailman/listinfo/ros-users
Unsubscribe: <http://lists.ros.org/mailman//options/ros-users>