Difference between revisions of "Category:HamsterAPIJavaTest"

From cogniteam
Jump to: navigation, search
Line 20: Line 20:
  
 
<syntaxhighlight lang="bash" line='line'>
 
<syntaxhighlight lang="bash" line='line'>
roslaunch hamster_api_server_cpp   hamster_api_simulation_server_and_gazbo_and_algs.launch: 'slam'"
+
cd hamster_ws
 +
source devel/setup.bash
 +
</syntaxhighlight>
 +
 
 +
and then launch Gazebo :
 +
 
 +
<syntaxhighlight lang="bash" line='line'>
 +
roslaunch hamster_api_server_cpp hamster_api_simulation_server_and_gazbo_and_algs.launch  
 +
</syntaxhighlight>

Revision as of 07:50, 9 July 2017

Tests in Java

How our Java tests works ?

before all test we have to be connected to the Robot so we beginning with the connection.

It is necessary to create an object hamster and it use all information about the Hamster class. Then we use we create a new HamsterClientParameters. It use to initialize the port and the base address of the Robot. and now we use the object Hamster that we created before with two parameters :

1- number agent of the robot

2- the name of the HamsterClientParameters that we created before.

We put this little function in a try catch of function with throws exception because if we can't be connected to the robot all the test after will failed.

Test with simulation

Before launch our test we have to launch our simulation software Gazebo.

<syntaxhighlight lang="bash" line='line'> cd hamster_ws source devel/setup.bash </syntaxhighlight>

and then launch Gazebo :

<syntaxhighlight lang="bash" line='line'> roslaunch hamster_api_server_cpp hamster_api_simulation_server_and_gazbo_and_algs.launch </syntaxhighlight>

Subcategories

This category has only the following subcategory.