Robot control (robot movement, arm movement, distance sensor, ...)
[
Front page
] [
New
|
List of pages
|
Search
|
Recent changes
|
Help
]
Start:
[[Tutorial]]
If you have any question, please contact yoann.dutel@outl...
#contents
*Introduction [#l64cca14]
This sample consist at different function to control a ro...
You can :
- Move the robot with a position control and speed just w...
- Move the two arm with a position control for each joint...
- Function to grasp and release an object.
- Determine a new coordinate to grasp an object on a table.
- Function to change of basis (world coordinate to robot ...
*Requirements [#f3d604ef]
- Ubuntu 32/64 bit PC. (Ubuntu installed on virtual machi...
- SIGServer 2.2.2 or later
- SIGViewer 2.2.0 or later
*Robot controller [#xc8790c9]
*** Download the source code from GitHub [#a58bb3c2]
You can clone the entire repository by running :
$ git clone https://github.com/SIGVerse/samples.git
Or you can get the source code here on Github : https://g...
Then place on the good directory :
$ cd samples/ControlRobot/
*** Build the project [#q07862eb]
Build the source code in your working directory.
$ make
*** Run the program [#k54b69fc]
Chooze your <xml> file for the environment.
Include in the package, the <xml> of EGPSR environment.
If you would change the environment, specify the ControlR...
#highlight(xml){{
<?xml version="1.0" encoding="utf8"?>
<instanciate class="WheelRobot-nii-v1.xml" type="Robot">
<set-attr-value name="name" value="robot_000"/>
<set-attr-value name="language" value="c++"/>
<set-attr-value name="implementation"
value="./ControlRobot.so"/>
<set-attr-value name="dynamics" value="false"/>
<set-attr-value name="x" value="0.0"/>
<set-attr-value name="y" value="30.0"/>
<set-attr-value name="z" value="0.0"/>
<set-attr-value name="collision" value="true"/>
<!--stereo camera right-->
<camera id="1"
link="REYE_LINK"
direction="0.0 0.0 1.0"
position="0.0 0.0 3.0"/>
<!--stereo camera left-->
<camera id="2"
link="LEYE_LINK"
direction="0.0 0.0 1.0"
position="0.0 0.0 3.0"/>
<!--distance sensor-->
<camera id="3"
link="WAIST_LINK0"
direction="0.0 0.0 1.0"
position="0.0 -5.0 20.0"/>
<!--monitoring camera-->
<camera id="4"
link="WAIST_LINK2"
direction="0 0 1"
quaternion="0.0 0.0 -0.966 0.259"
position="0.0 40.0 120.0"/>
</instanciate>
}}
*** Starting the simulation [#bcbb7188]
In your working directory :
$ sigserver.sh -w ./house_example.xml
*How use the template [#k54b69fc]
You can use a demonstrator for each function in this temp...
-To move the robot without obstacle avoidance
--1) In SIGViewer, send the message "move" to the robot
--2) In SIGServer, indicate the destination coordinate
--3) In SIGServer, indicate "2" for avoidance
-To move the robot with obstacle avoidance
--1) In SIGViewer, send the message "move" to the robot
--2) In SIGServer, indicate the destination coordinate
--3) In SIGServer, indicate "1" for avoidance
--Caution : the distance sensor is not completly operatio...
-To move the arm
--1) In SIGViewer, send the message "move_left_arm" or "m...
--2) In SIGServer, indicate the angle for each joints (re...
-To grasp an object on a table automatically
--1) In SIGViewer, send the message "grasp_planning" to t...
--2) In SIGServer, indicate the name of the table and the...
--This function is a little demonstration how we can use ...
-To get hand coordinates in robot basis
--1) In SIGViewer, send the message "get_LeftHand" or "ge...
--2) In SIGServer, you can see the coordinate of the hand.
-To grasp an object
--1) In SIGViewer, send the message "grasp_left" or "gras...
--2) In SIGServer, indicate the object name.
-To release an object
--1) In SIGViewer, send the message "release_left" or "re...
* How use the different function in others task [#k54b69fc]
*** goTo(Vector3d pos, double rangeToPoint=0, double Robo...
This function is to move the robot in his environment. Th...
-This function has need :
--getAngularXonVect
--getDist2D
--getRoll
-Parameters
--pos : the destination coordinates
--rangeToPoint : the distance between coordinates and rea...
--Robot_speed : speed of the robot (initially : 3)
-Return true if the position is reached
-This function must be used only in OnAction
*** goTo_AvoidObstacle(Vector3d pos, double rangeToPoint=...
This function is to move the robot in his environment too...
Caution : this function is not totally finish. There are ...
-This function has need :
--goTo
--distance_sensor
-Parameters
--pos : the destination coordinates
--rangeToPoint : the distance between coordinates and rea...
--Robot_speed : speed of the robot (initially : 3)
-Return true if the position is reached
-This function must be used only in OnAction
*** distance_sensor() [#k54b69fc]
This function return the distance between the camera and ...
For more informations, refer to the tutorial [[Distance s...
-This function has need to be connect at SIGViewer with a...
-Return : the distance
*** moveLeftArm() or moveRightArm() [#k54b69fc]
These functions move the arm with a velocity in each joint.
-These functions don't need others to run properly
-Write the value of each joint in the global variable <m_...
-Return true if the angles value are reached
-This function must be used only in OnAction
***grasp_left_hand(std::string &object) or grasp_left_han...
These functions grasp an object in the robot hand.
-These functions don't need others to run properly
-Parameter : the name of the object to be grasped
-Writes in a global variable if an object is grasped or not
-It's possible to use these functions when we want
***release_left_hand() or release_right_hand() [#r948e68a]
These functions release an object.
-These functions don't need others to run properly
-It's possible to use these functions when we want
***changeBasis_WorldToRobot(Vector3d pos) [#gb3837e2]
This function transform a coordinate in world basis to a ...
-This function has need only getRoll
-Parameter : coordinate in world basis
-Return : coordinate in robot basis
#counter
End:
[[Tutorial]]
If you have any question, please contact yoann.dutel@outl...
#contents
*Introduction [#l64cca14]
This sample consist at different function to control a ro...
You can :
- Move the robot with a position control and speed just w...
- Move the two arm with a position control for each joint...
- Function to grasp and release an object.
- Determine a new coordinate to grasp an object on a table.
- Function to change of basis (world coordinate to robot ...
*Requirements [#f3d604ef]
- Ubuntu 32/64 bit PC. (Ubuntu installed on virtual machi...
- SIGServer 2.2.2 or later
- SIGViewer 2.2.0 or later
*Robot controller [#xc8790c9]
*** Download the source code from GitHub [#a58bb3c2]
You can clone the entire repository by running :
$ git clone https://github.com/SIGVerse/samples.git
Or you can get the source code here on Github : https://g...
Then place on the good directory :
$ cd samples/ControlRobot/
*** Build the project [#q07862eb]
Build the source code in your working directory.
$ make
*** Run the program [#k54b69fc]
Chooze your <xml> file for the environment.
Include in the package, the <xml> of EGPSR environment.
If you would change the environment, specify the ControlR...
#highlight(xml){{
<?xml version="1.0" encoding="utf8"?>
<instanciate class="WheelRobot-nii-v1.xml" type="Robot">
<set-attr-value name="name" value="robot_000"/>
<set-attr-value name="language" value="c++"/>
<set-attr-value name="implementation"
value="./ControlRobot.so"/>
<set-attr-value name="dynamics" value="false"/>
<set-attr-value name="x" value="0.0"/>
<set-attr-value name="y" value="30.0"/>
<set-attr-value name="z" value="0.0"/>
<set-attr-value name="collision" value="true"/>
<!--stereo camera right-->
<camera id="1"
link="REYE_LINK"
direction="0.0 0.0 1.0"
position="0.0 0.0 3.0"/>
<!--stereo camera left-->
<camera id="2"
link="LEYE_LINK"
direction="0.0 0.0 1.0"
position="0.0 0.0 3.0"/>
<!--distance sensor-->
<camera id="3"
link="WAIST_LINK0"
direction="0.0 0.0 1.0"
position="0.0 -5.0 20.0"/>
<!--monitoring camera-->
<camera id="4"
link="WAIST_LINK2"
direction="0 0 1"
quaternion="0.0 0.0 -0.966 0.259"
position="0.0 40.0 120.0"/>
</instanciate>
}}
*** Starting the simulation [#bcbb7188]
In your working directory :
$ sigserver.sh -w ./house_example.xml
*How use the template [#k54b69fc]
You can use a demonstrator for each function in this temp...
-To move the robot without obstacle avoidance
--1) In SIGViewer, send the message "move" to the robot
--2) In SIGServer, indicate the destination coordinate
--3) In SIGServer, indicate "2" for avoidance
-To move the robot with obstacle avoidance
--1) In SIGViewer, send the message "move" to the robot
--2) In SIGServer, indicate the destination coordinate
--3) In SIGServer, indicate "1" for avoidance
--Caution : the distance sensor is not completly operatio...
-To move the arm
--1) In SIGViewer, send the message "move_left_arm" or "m...
--2) In SIGServer, indicate the angle for each joints (re...
-To grasp an object on a table automatically
--1) In SIGViewer, send the message "grasp_planning" to t...
--2) In SIGServer, indicate the name of the table and the...
--This function is a little demonstration how we can use ...
-To get hand coordinates in robot basis
--1) In SIGViewer, send the message "get_LeftHand" or "ge...
--2) In SIGServer, you can see the coordinate of the hand.
-To grasp an object
--1) In SIGViewer, send the message "grasp_left" or "gras...
--2) In SIGServer, indicate the object name.
-To release an object
--1) In SIGViewer, send the message "release_left" or "re...
* How use the different function in others task [#k54b69fc]
*** goTo(Vector3d pos, double rangeToPoint=0, double Robo...
This function is to move the robot in his environment. Th...
-This function has need :
--getAngularXonVect
--getDist2D
--getRoll
-Parameters
--pos : the destination coordinates
--rangeToPoint : the distance between coordinates and rea...
--Robot_speed : speed of the robot (initially : 3)
-Return true if the position is reached
-This function must be used only in OnAction
*** goTo_AvoidObstacle(Vector3d pos, double rangeToPoint=...
This function is to move the robot in his environment too...
Caution : this function is not totally finish. There are ...
-This function has need :
--goTo
--distance_sensor
-Parameters
--pos : the destination coordinates
--rangeToPoint : the distance between coordinates and rea...
--Robot_speed : speed of the robot (initially : 3)
-Return true if the position is reached
-This function must be used only in OnAction
*** distance_sensor() [#k54b69fc]
This function return the distance between the camera and ...
For more informations, refer to the tutorial [[Distance s...
-This function has need to be connect at SIGViewer with a...
-Return : the distance
*** moveLeftArm() or moveRightArm() [#k54b69fc]
These functions move the arm with a velocity in each joint.
-These functions don't need others to run properly
-Write the value of each joint in the global variable <m_...
-Return true if the angles value are reached
-This function must be used only in OnAction
***grasp_left_hand(std::string &object) or grasp_left_han...
These functions grasp an object in the robot hand.
-These functions don't need others to run properly
-Parameter : the name of the object to be grasped
-Writes in a global variable if an object is grasped or not
-It's possible to use these functions when we want
***release_left_hand() or release_right_hand() [#r948e68a]
These functions release an object.
-These functions don't need others to run properly
-It's possible to use these functions when we want
***changeBasis_WorldToRobot(Vector3d pos) [#gb3837e2]
This function transform a coordinate in world basis to a ...
-This function has need only getRoll
-Parameter : coordinate in world basis
-Return : coordinate in robot basis
#counter
Page: