class NiryoRosWrapper(AbstractNiryoRosWrapper):
Constructor: NiryoRosWrapper(collision_policy)
Undocumented
| Class Method | wait |
Undocumented |
| Static Method | copy |
Copies a position and adds offset to some coordinates |
| Static Method | get |
Returns the joints and positions min and max values |
| Static Method | get |
Gets last stream image parameters: Brightness factor, Contrast factor, Saturation factor. |
| Static Method | get |
Undocumented |
| Static Method | get |
Get list of saved dynamic frames |
| Static Method | get |
Asks the pose manager service which positions are available |
| Static Method | get |
Asks the workspace manager service names of the available workspace |
| Static Method | list |
Translates (x, y, z, roll, pitch, yaw) to a RobotState Object |
| Static Method | point |
Undocumented |
| Static Method | quaternion |
Undocumented |
| Static Method | robot |
Translates a RobotState Object to (x, y, z, roll, pitch, yaw) |
| Static Method | wait |
Undocumented |
| Method | __init__ |
Undocumented |
| Method | activate |
Activates electromagnet associated to electromagnet_id on pin_id |
| Method | analog |
Reads pin number pin_id and returns its state |
| Method | analog |
Sets pin_id state to pin_state |
| Method | break |
Undocumented |
| Method | calibrate |
Calls service to calibrate motors then waits for its end. If failed, raises NiryoRosWrapperException |
| Method | calibrate |
Calls service to calibrate motors then waits for its end. If failed, raises NiryoRosWrapperException |
| Method | clean |
Sends delete all trajectory command to the trajectory manager service |
| Method | clear |
Undocumented |
| Method | close |
Closes gripper with a speed 'speed' |
| Method | compute |
Undocumented |
| Method | compute |
Undocumented |
| Method | control |
Controls conveyor associated to conveyor_id. Then stops it if bool_control_on is False, else refreshes it speed and direction |
| Method | deactivate |
Deactivates electromagnet associated to electromagnet_id on pin_id |
| Method | delete |
Delete a dynamic frame |
| Method | delete |
Sends delete command to the pose manager service |
| Method | delete |
Sends delete command to the trajectory manager service |
| Method | delete |
Calls workspace manager to delete a certain workspace |
| Method | detect |
No summary |
| Method | digital |
Reads pin number pin_id and returns its state |
| Method | digital |
Sets pin_id state to pin_state |
| Method | edit |
Modify a dynamic frame |
| Method | enable |
Enables or disables the TCP function (Tool Center Point). If activation is requested, the last recorded TCP value will be applied. The default value depends on the gripper equipped. If deactivation is requested, the TCP will be coincident with the tool_link... |
| Method | execute |
Undocumented |
| Method | execute |
Sends execution command to the trajectory manager service |
| Method | execute |
Executes trajectory from a list of pose |
| Method | execute |
Executes trajectory from list of poses and joints |
| Method | forward |
Computes forward kinematics |
| Method | get |
Undocumented |
| Method | get |
Gets calibration object: camera intrinsics, distortions coefficients |
| Method | get |
Gets last stream image in a compressed format |
| Method | get |
Gives conveyors feedback |
| Method | get |
Undocumented |
| Method | get |
Uses /niryo_robot_tools_commander/current_id topic to get current tool id |
| Method | get |
Undocumented |
| Method | get |
Undocumented |
| Method | get |
Gets Digital IO state : Names, modes, states |
| Method | get |
Gets hardware status : Temperature, Hardware version, motors names & types ... |
| Method | get |
Gets the robot hardware version |
| Method | get |
Uses /joint_states topic to get the name of the joints |
| Method | get |
Uses /joint_states topic to get joints status |
| Method | get |
Uses /niryo_robot/learning_mode/state topic subscriber to get learning mode status |
| Method | get |
Gets the max velocity scaling factor :return: max velocity scaling factor :rtype: float |
| Method | get |
Uses /niryo_robot/robot_state topic to get pose status |
| Method | get |
Uses /niryo_robot/robot_state topic to get pose status |
| Method | get |
Gets saved pose from robot intern storage Will raise error if position does not exist |
| Method | get |
Get name, description and pose of a dynamic frame |
| Method | get |
Asks the pose trajectory service which trajectories are available |
| Method | get |
The simulation mode |
| Method | get |
Get the robot software version |
| Method | get |
First detects the specified object using the camera and then returns the robot pose in which the object can be picked with the current tool |
| Method | get |
Given a pose (x_rel, y_rel, yaw_rel) relative to a workspace, this function returns the robot pose in which the current tool will be able to pick an object at this pose. The height_offset argument (in m) defines how high the tool will hover over the workspace... |
| Method | get |
Gets saved trajectory from robot intern storage Will raise error if position does not exist |
| Method | get |
Gets the 4 workspace poses of the workspace called 'name' |
| Method | get |
Gives the length over width ratio of a certain workspace |
| Method | grasp |
Grasps with the tool linked to tool_id This action corresponds to - Close gripper for Grippers - Pull Air for Vacuum pump - Activate for Electromagnet |
| Method | highlight |
Undocumented |
| Method | inverse |
Computes inverse kinematics |
| Method | jog |
Makes a Jog on joints position |
| Method | jog |
Makes a Jog on end-effector position |
| Method | move |
Undocumented |
| Method | move |
Executes Move joints action |
| Method | move |
Moves robot end effector pose to a (x, y, z, roll, pitch, yaw) pose, with a linear trajectory, in a particular frame if defined |
| Method | move |
Move robot end of a offset by a linear movement in a frame |
| Method | move |
Moves robot end effector pose to a (x, y, z, roll, pitch, yaw) pose, in a particular frame if defined |
| Method | move |
Moves robot end effector pose to a pose saved |
| Method | move |
Move robot end of a offset in a frame |
| Method | move |
Calls robot action service to draw a spiral trajectory |
| Method | move |
Same as get_target_pose_from_cam but directly moves to this position |
| Method | move |
Moves to Sleep pose which allows the user to activate the learning mode without the risk of the robot hitting something because of gravity |
| Method | move |
Undocumented |
| Method | open |
Opens gripper with a speed 'speed' |
| Method | pick |
Executes a pick and place. If an error happens during the movement, error will be raised -> Args param is for development purposes |
| Method | pick |
Executes a picking from a position. If an error happens during the movement, error will be raised A picking is described as : - going over the object - going down until height = z - grasping with tool - going back over the object... |
| Method | place |
Executes a placing from a position. If an error happens during the movement, error will be raised A placing is described as : - going over the place - going down until height = z - releasing the object with tool - going back over the place... |
| Method | pull |
Pulls air |
| Method | push |
Pulls air |
| Method | reboot |
Reboots the robots motors |
| Method | release |
Releases with the tool associated to tool_id This action corresponds to - Open gripper for Grippers - Push Air for Vacuum pump - Deactivate for Electromagnet |
| Method | request |
Calls service to set the request calibration value. If failed, raises NiryoRosWrapperException |
| Method | reset |
Resets the TCP (Tool Center Point) transformation. The TCP will be reset according to the tool equipped |
| Method | save |
Create a dynamic frame with 3 points (origin, x, y) |
| Method | save |
Create a dynamic frame with 3 poses (origin, x, y) |
| Method | save |
Saves trajectory object and sends it to the trajectory manager service |
| Method | save |
Saves pose in robot's memory |
| Method | save |
Saves trajectory object and sends it to the trajectory manager service |
| Method | save |
Saves workspace by giving the poses of its 4 corners in the good order |
| Method | save |
Saves workspace by giving the poses of the robot to point its 4 corners with the calibration Tip. Corners should be in the good order |
| Method | set |
Sets relative max acceleration (in %) |
| Method | set |
Sets relative max velocity (in %) |
| Method | set |
Modifies image brightness |
| Method | set |
Modifies image contrast |
| Method | set |
Scans for conveyor on can bus. If conveyor detected, returns the conveyor ID |
| Method | set |
Turns jog controller On or Off |
| Method | set |
Calsl service to set_learning_mode according to set_bool. If failed, raises NiryoRosWrapperException |
| Method | set |
Sets pin number pin_id to mode pin_mode |
| Method | set |
Modifies image saturation |
| Method | set |
Activates the TCP function (Tool Center Point) and defines the transformation between the tool_link frame and the TCP frame |
| Method | setup |
Setups electromagnet on pin |
| Method | shift |
Executes Shift pose action with a linear trajectory |
| Method | shift |
Executes Shift pose action |
| Method | stop |
Stops the robot movement |
| Method | tool |
Reboots the motor of the tool equipped. Useful when an Overload error occurs. (cf HardwareStatus) |
| Method | unset |
Removes specific conveyor |
| Method | update |
Calls service niryo_robot_tools_commander/update_tool to update tool |
| Method | update |
Undocumented |
| Method | vision |
Picks the specified object from the workspace. This function has multiple phases: 1. detects object using the camera 2. prepares the current tool for picking 3. approaches the object 4. moves down to the correct picking pose 5... |
| Method | vision |
Move Joints to observation_joints, then executes a vision pick |
| Method | vision |
Move Pose to observation_pose, then executes a vision pick |
| Instance Variable | tf |
Undocumented |
| Instance Variable | tf |
Undocumented |
| Property | collision |
Undocumented |
| Property | custom |
Manages the custom button |
| Property | database |
Undocumented |
| Property | led |
Manages the LED ring |
| Property | robot |
Undocumented |
| Property | sound |
Manages sound |
| Method | __advertise |
Undocumented |
| Method | __calculate |
Calculate the pose by a relative movement (x,y,z,roll,pitch,yaw) in the frame (frame_name) |
| Method | __calculate |
Calculate the pose (x,y,z,roll,pitch,yaw) in the frame (frame_name) |
| Method | __calibrate |
Call service to calibrate motors then waits for its end. If failed, raises NiryoRosWrapperException |
| Method | __callback |
Undocumented |
| Method | __conveyor |
Undocumented |
| Method | __conveyor |
Undocumented |
| Method | __execute |
Undocumented |
| Method | __jog |
Undocumented |
| Method | __list |
Undocumented |
| Method | __list |
Undocumented |
| Method | __move |
Executes Move pose action |
| Method | __ping |
Undocumented |
| Method | __transform |
Transform pose from a local frame to source frame |
| Method | _create |
Undocumented |
| Instance Variable | __advertise |
Undocumented |
| Instance Variable | __analog |
Undocumented |
| Instance Variable | __break |
Undocumented |
| Instance Variable | __camera |
Undocumented |
| Instance Variable | __compressed |
Undocumented |
| Instance Variable | __conveyors |
Undocumented |
| Instance Variable | __custom |
Undocumented |
| Instance Variable | __database |
Undocumented |
| Instance Variable | __digital |
Undocumented |
| Instance Variable | __follow |
Undocumented |
| Instance Variable | __hardware |
Undocumented |
| Instance Variable | __highlight |
Undocumented |
| Instance Variable | __hw |
Undocumented |
| Instance Variable | __joints |
Undocumented |
| Instance Variable | __learning |
Undocumented |
| Instance Variable | __led |
Undocumented |
| Instance Variable | __max |
Undocumented |
| Instance Variable | __node |
Undocumented |
| Instance Variable | __pose |
Undocumented |
| Instance Variable | __robot |
Undocumented |
| Instance Variable | __robot |
Undocumented |
| Instance Variable | __service |
Undocumented |
| Instance Variable | __simulation |
Undocumented |
| Instance Variable | __software |
Undocumented |
| Instance Variable | __sound |
Undocumented |
| Instance Variable | __tools |
Undocumented |
| Instance Variable | _collision |
Undocumented |
| Instance Variable | _collision |
Undocumented |
def copy_position_with_offsets(copied_pose, x_offset=0.0, y_offset=0.0, z_offset=0.0): ¶
Copies a position and adds offset to some coordinates
Gets last stream image parameters: Brightness factor, Contrast factor, Saturation factor.
Brightness factor: How much to adjust the brightness. 0.5 will give a darkened image, 1 will give the original image while 2 will enhance the brightness by a factor of 2.
Contrast factor: While a factor of 1 gives original image. Making the factor towards 0 makes the image greyer, while factor>1 increases the contrast of the image.
Saturation factor: 0 will give a black and white image, 1 will give the original image while 2 will enhance the saturation by a factor of 2.
| Returns | |
| float, float, float | Brightness factor, Contrast factor, Saturation factor |
Get list of saved dynamic frames
| Returns | |
| list[str], list[str] | list of dynamic frames name, list of description of dynamic frames |
Asks the pose manager service which positions are available
| Parameters | |
| with | If True it returns the poses descriptions |
| Returns | |
| list[str] | list of positions name |
Asks the workspace manager service names of the available workspace
| Returns | |
| list[str] | list of workspaces name |
Activates electromagnet associated to electromagnet_id on pin_id
| Parameters | |
| pin | Pin ID |
| Returns | |
| (int, str) | status, message |
Reads pin number pin_id and returns its state
| Parameters | |
| pin | The name of the pin |
| Returns | |
| PinState | state |
Sets pin_id state to pin_state
| Parameters | |
| pin | The name of the pin |
| analog | |
| Returns | |
| (int, str) | status, message |
Calls service to calibrate motors then waits for its end. If failed, raises NiryoRosWrapperException
| Returns | |
| (int, str) | status, message |
Calls service to calibrate motors then waits for its end. If failed, raises NiryoRosWrapperException
| Returns | |
| (int, str) | status, message |
Sends delete all trajectory command to the trajectory manager service
| Returns | |
| (int, str) | status, message |
Closes gripper with a speed 'speed'
| Parameters | |
| speed:int | Default -> 500 |
| max | Default -> 100 |
| hold | Default -> 20 |
| Returns | |
| (int, str) | status, message |
Undocumented
Controls conveyor associated to conveyor_id. Then stops it if bool_control_on is False, else refreshes it speed and direction
| Parameters | |
| conveyor | ConveyorID.ID_1 or ConveyorID.ID_2 |
| bool | True for activate, False for deactivate |
| speed:int | target speed |
| direction:ConveyorDirection | Target direction |
| Returns | |
| (int, str) | status, message |
Deactivates electromagnet associated to electromagnet_id on pin_id
| Parameters | |
| pin | Pin ID |
| Returns | |
| (int, str) | status, message |
Delete a dynamic frame
| Parameters | |
| frame | name of the frame to remove |
| belong | indicate if the frame belong to a workspace |
| Returns | |
| (int, str) | status, message |
Sends delete command to the trajectory manager service
| Parameters | |
| trajectory | name |
| Returns | |
| (int, str) | status, message |
Calls workspace manager to delete a certain workspace
| Parameters | |
| name:str | workspace name |
| Returns | |
| (int, str) | status, message |
| Parameters | |
| workspace | name of the workspace |
| shape:ObjectShape | shape of the target |
| color:ObjectColor | color of the target |
| Returns | |
| (bool, RobotState, str, str) | object_found, object_pose, object_shape, object_color |
Reads pin number pin_id and returns its state
| Parameters | |
| pin | The name of the pin |
| Returns | |
| PinState | state |
Sets pin_id state to pin_state
| Parameters | |
| pin | The name of the pin |
| digital | |
| Returns | |
| (int, str) | status, message |
Modify a dynamic frame
| Parameters | |
| frame | name of the frame |
| new | new name of the frame |
| new | new description of the frame |
| Returns | |
| (int, str) | status, message |
Enables or disables the TCP function (Tool Center Point). If activation is requested, the last recorded TCP value will be applied. The default value depends on the gripper equipped. If deactivation is requested, the TCP will be coincident with the tool_link
| Parameters | |
| enable:Bool | True to enable, False otherwise. |
| Returns | |
| (int, str) | status, message |
Sends execution command to the trajectory manager service
| Parameters | |
| trajectory | name |
| Returns | |
| (int, str) | status, message |
Executes trajectory from a list of pose
| Parameters | |
| list | list of [x, y, z, qx, qy, qz, qw] or list of [x, y, z, roll, pitch, yaw] |
| dist | Distance from waypoints before smoothing trajectory |
| Returns | |
| (int, str) | status, message |
Executes trajectory from list of poses and joints
| Parameters | |
| list | List of [x,y,z,qx,qy,qz,qw] or list of [x,y,z,roll,pitch,yaw] or a list of [j1,j2,j3,j4,j5,j6] |
| list | List of string 'pose' or 'joint', or ['pose'] (if poses only) or ['joint'] (if joints only). If None, it is assumed there are only poses in the list. |
| dist | Distance from waypoints before smoothing trajectory |
| Returns | |
| (int, str) | status, message |
Computes forward kinematics
| Parameters | |
| j1:float | |
| j2:float | |
| j3:float | |
| j4:float | |
| j5:float | |
| j6:float | |
| Returns | |
| list[float] | list corresponding to [x, y, z, roll, pitch, yaw] |
Gets calibration object: camera intrinsics, distortions coefficients
| Returns | |
| (list, list) | raw camera intrinsics, distortions coefficients |
Gives conveyors feedback
| Returns | |
| List(int, bool, bool, int, int) | List[ID, connection_state, running, speed, direction] |
Gets Digital IO state : Names, modes, states
| Returns | |
| IOsState | Infos contains in a IOsState object (see niryo_robot_msgs) |
Gets hardware status : Temperature, Hardware version, motors names & types ...
| Returns | |
| HardwareStatus | Infos contains in a HardwareStatus object (see niryo_robot_msgs) |
Uses /joint_states topic to get the name of the joints
| Returns | |
| list[string] | list of the name of the joints |
Uses /niryo_robot/learning_mode/state topic subscriber to get learning mode status
| Returns | |
| bool | True if activate else False |
Uses /niryo_robot/robot_state topic to get pose status
| Returns | |
| RobotState | RobotState object (position.x/y/z && rpy.roll/pitch/yaw && orientation.x/y/z/w) |
Uses /niryo_robot/robot_state topic to get pose status
| Returns | |
| list[float] | list corresponding to [x, y, z, roll, pitch, yaw] |
Gets saved pose from robot intern storage Will raise error if position does not exist
| Parameters | |
| pose | Pose Name |
| Returns | |
| tuple[float] | x, y, z, roll, pitch, yaw |
Get name, description and pose of a dynamic frame
| Parameters | |
| frame | name of the frame |
| Returns | |
| list[str, str, list[float]] | name, description, position and orientation of a frame |
Asks the pose trajectory service which trajectories are available
| Returns | |
| list[str] | list of trajectory name |
Get the robot software version
| Returns | |
| (str, str, list[str], list[str]) | rpi_image_version, ros_niryo_robot_version, motor_names, stepper_firmware_versions |
First detects the specified object using the camera and then returns the robot pose in which the object can be picked with the current tool
| Parameters | |
| workspace | name of the workspace |
| height | offset between the workspace and the target height |
| shape:ObjectShape | shape of the target |
| color:ObjectColor | color of the target |
| Returns | |
| (bool, RobotState, str, str) | object_found, object_pose, object_shape, object_color |
Given a pose (x_rel, y_rel, yaw_rel) relative to a workspace, this function returns the robot pose in which the current tool will be able to pick an object at this pose. The height_offset argument (in m) defines how high the tool will hover over the workspace. If height_offset = 0, the tool will nearly touch the workspace.
| Parameters | |
| workspace | name of the workspace |
| height | offset between the workspace and the target height |
| x | |
| y | |
| yaw | |
| Returns | |
| RobotState | target_pose |
Gets saved trajectory from robot intern storage Will raise error if position does not exist
| Parameters | |
| trajectory | |
| Returns | |
| list[list[float]] | list of [x, y, z, qx, qy, qz, qw] |
| Raises | |
NiryoRosWrapperException | If trajectory file doesn't exist |
Gets the 4 workspace poses of the workspace called 'name'
| Parameters | |
| name:str | workspace name |
| Returns | |
| list[list] | List of the 4 workspace poses |
Gives the length over width ratio of a certain workspace
| Parameters | |
| name:str | workspace name |
| Returns | |
| float | ratio |
Grasps with the tool linked to tool_id This action corresponds to - Close gripper for Grippers - Pull Air for Vacuum pump - Activate for Electromagnet
| Parameters | |
| pin | [Only required for electromagnet] Pin ID of the electromagnet |
| Returns | |
| (int, str) | status, message |
Computes inverse kinematics
| Parameters | |
| x:float | |
| y:float | |
| z:float | |
| roll:float | |
| pitch:float | |
| yaw:float | |
| Returns | |
| list[float] | list of joints value |
Makes a Jog on joints position
| Parameters | |
| shift | list corresponding to the shift to be applied to each joint |
| Returns | |
| (int, str) | status, message |
Makes a Jog on end-effector position
| Parameters | |
| shift | list corresponding to the shift to be applied to the position |
| Returns | |
| (int, str) | status, message |
Executes Move joints action
| Parameters | |
| j1:float | |
| j2:float | |
| j3:float | |
| j4:float | |
| j5:float | |
| j6:float | |
| Returns | |
| (int, str) | status, message |
Moves robot end effector pose to a (x, y, z, roll, pitch, yaw) pose, with a linear trajectory, in a particular frame if defined
| Parameters | |
| x:float | |
| y:float | |
| z:float | |
| roll:float | |
| pitch:float | |
| yaw:float | |
| frame:str | |
| Returns | |
| (int, str) | status, message |
Move robot end of a offset by a linear movement in a frame
| Parameters | |
| offset:list[float] | list which contains offset of x, y, z, roll, pitch, yaw |
| frame:str | name of local frame |
| Returns | |
| (int, str) | status, message |
Moves robot end effector pose to a (x, y, z, roll, pitch, yaw) pose, in a particular frame if defined
| Parameters | |
| x:float | |
| y:float | |
| z:float | |
| roll:float | |
| pitch:float | |
| yaw:float | |
| frame:str | |
| Returns | |
| (int, str) | status, message |
Moves robot end effector pose to a pose saved
| Parameters | |
| pose | |
| Returns | |
| (int, str) | status, message |
Move robot end of a offset in a frame
| Parameters | |
| offset:list[float] | list which contains offset of x, y, z, roll, pitch, yaw |
| frame:str | name of local frame |
| Returns | |
| (int, str) | status, message |
Calls robot action service to draw a spiral trajectory
| Parameters | |
| radius | maximum distance between the spiral and the starting point |
| angle | rotation between each waypoint creation |
| nb | number of waypoints from the beginning to the end of the spiral |
| plan:int | xyz plan of the spiral: 1 = yz plan, 2 = xz plan, 3 = xy plan |
| Returns | |
| (int, str) | status, message |
Same as get_target_pose_from_cam but directly moves to this position
| Parameters | |
| workspace:str | name of the workspace |
| height | offset between the workspace and the target height |
| shape:ObjectShape | shape of the target |
| color:ObjectColor | color of the target |
| Returns | |
| (bool, ObjectShape, ObjectColor) | object_found, object_shape, object_color |
Moves to Sleep pose which allows the user to activate the learning mode without the risk of the robot hitting something because of gravity
| Returns | |
| (int, str) | status, message |
Opens gripper with a speed 'speed'
| Parameters | |
| speed:int | Default -> 500 |
| max | Default -> 100 |
| hold | Default -> 20 |
| Returns | |
| (int, str) | status, message |
Executes a pick and place. If an error happens during the movement, error will be raised -> Args param is for development purposes
| Parameters | |
| pick | |
| place | |
| dist | Distance from waypoints before smoothing trajectory |
| Returns | |
| (int, str) | status, message |
Executes a picking from a position. If an error happens during the movement, error will be raised A picking is described as : - going over the object - going down until height = z - grasping with tool - going back over the object
| Parameters | |
| x:float | |
| y:float | |
| z:float | |
| roll:float | |
| pitch:float | |
| yaw:float | |
| Returns | |
| (int, str) | status, message |
Executes a placing from a position. If an error happens during the movement, error will be raised A placing is described as : - going over the place - going down until height = z - releasing the object with tool - going back over the place
| Parameters | |
| x:float | |
| y:float | |
| z:float | |
| roll:float | |
| pitch:float | |
| yaw:float | |
| Returns | |
| (int, str) | status, message |
Releases with the tool associated to tool_id This action corresponds to - Open gripper for Grippers - Push Air for Vacuum pump - Deactivate for Electromagnet
| Parameters | |
| pin | [Only required for electromagnet] Pin ID of the electromagnet |
| Returns | |
| (int, str) | status, message |
Calls service to set the request calibration value. If failed, raises NiryoRosWrapperException
| Returns | |
| (int, str) | status, message |
Resets the TCP (Tool Center Point) transformation. The TCP will be reset according to the tool equipped
| Returns | |
| (int, str) | status, message |
Create a dynamic frame with 3 points (origin, x, y)
| Parameters | |
| frame | name of the frame |
| description:str | description of the frame |
| list | 3 points needed to create the frame |
| belong | indicate if the frame belong to a workspace |
| Returns | |
| (int, str) | status, message |
Create a dynamic frame with 3 poses (origin, x, y)
| Parameters | |
| frame | name of the frame |
| description:str | description of the frame |
| list | 3 poses needed to create the frame |
| belong | indicate if the frame belong to a workspace |
| Returns | |
| (int, str) | status, message |
Saves trajectory object and sends it to the trajectory manager service
| Parameters | |
| trajectory | name which will have the trajectory |
| trajectory | description which will have the trajectory |
| Returns | |
| (int, str) | status, message |
Saves pose in robot's memory
| Parameters | |
| name:str | |
| x:float | |
| y:float | |
| z:float | |
| roll:float | |
| pitch:float | |
| yaw:float | |
| Returns | |
| (int, str) | status, message |
Saves trajectory object and sends it to the trajectory manager service
| Parameters | |
| trajectory | list of trajectory_msgs/JointTrajectoryPoint |
| trajectory | name which will have the trajectory |
| trajectory | Undocumented |
| Returns | |
| (int, str) | status, message |
Saves workspace by giving the poses of its 4 corners in the good order
| Parameters | |
| name:str | workspace name, max 30 char. |
| list | list of 4 corners [x, y, z] |
| Returns | |
| (int, str) | status, message |
Saves workspace by giving the poses of the robot to point its 4 corners with the calibration Tip. Corners should be in the good order
| Parameters | |
| name:str | workspace name, max 30 char. |
| list | list of 4 corners pose |
| Returns | |
| (int, str) | status, message |
Sets relative max acceleration (in %)
| Parameters | |
| percentage:int | Percentage of max acceleration |
| Returns | |
| (int, str) | status, message |
Sets relative max velocity (in %)
| Parameters | |
| percentage:int | Percentage of max velocity |
| Returns | |
| (int, str) | status, message |
Modifies image brightness
| Parameters | |
| brightness | How much to adjust the brightness. 0.5 will give a darkened image, 1 will give the original image while 2 will enhance the brightness by a factor of 2. |
| Returns | |
| (int, str) | status, message |
Modifies image contrast
| Parameters | |
| contrast | While a factor of 1 gives original image. Making the factor towards 0 makes the image greyer, while factor>1 increases the contrast of the image. |
| Returns | |
| (int, str) | status, message |
Scans for conveyor on can bus. If conveyor detected, returns the conveyor ID
| Returns | |
| ConveyorID | ID |
| Raises | |
NiryoRosWrapperException | |
Turns jog controller On or Off
| Parameters | |
| state:bool | True to turn on, else False |
| Returns | |
| (int, str) | status, message |
Calsl service to set_learning_mode according to set_bool. If failed, raises NiryoRosWrapperException
| Parameters | |
| set | True to activate, False to deactivate |
| Returns | |
| (int, str) | status, message |
Sets pin number pin_id to mode pin_mode
| Parameters | |
| pin | |
| pin | |
| Returns | |
| (int, str) | status, message |
Modifies image saturation
| Parameters | |
| saturation | How much to adjust the saturation. 0 will give a black and white image, 1 will give the original image while 2 will enhance the saturation by a factor of 2. |
| Returns | |
| (int, str) | status, message |
Activates the TCP function (Tool Center Point) and defines the transformation between the tool_link frame and the TCP frame
| Parameters | |
| x:float | |
| y:float | |
| z:float | |
| roll:float | |
| pitch:float | |
| yaw:float | |
| Returns | |
| (int, str) | status, message |
Executes Shift pose action with a linear trajectory
| Parameters | |
| axis:ShiftPose | Value of RobotAxis enum corresponding to where the shift happens |
| value:float | shift value |
| Returns | |
| (int, str) | status, message |
Executes Shift pose action
| Parameters | |
| axis:ShiftPose | Value of RobotAxis enum corresponding to where the shift happens |
| value:float | shift value |
| Returns | |
| (int, str) | status, message |
Reboots the motor of the tool equipped. Useful when an Overload error occurs. (cf HardwareStatus)
| Returns | |
| (bool, str) | success, message |
Removes specific conveyor
| Parameters | |
| conveyor | Basically, ConveyorID.ONE or ConveyorID.TWO |
| Returns | |
| (int, str) | status, message |
| Raises | |
NiryoRosWrapperException | |
Calls service niryo_robot_tools_commander/update_tool to update tool
| Returns | |
| (int, str) | status, message |
Picks the specified object from the workspace. This function has multiple phases: 1. detects object using the camera 2. prepares the current tool for picking 3. approaches the object 4. moves down to the correct picking pose 5. actuates the current tool 6. lifts the object
| Parameters | |
| workspace | name of the workspace |
| height | offset between the workspace and the target height |
| shape:ObjectShape | shape of the target |
| color:ObjectColor | color of the target |
| Returns | |
| (bool, ObjectShape, ObjectColor) | object_found, object_shape, object_color |
Move Joints to observation_joints, then executes a vision pick
Move Pose to observation_pose, then executes a vision pick
Manages the custom button
Example:
from niryo_robot_python_ros_wrapper.ros_wrapper import * robot = NiryoRosWrapper() print(robot.custom_button.state)
Manages the LED ring
Example:
from niryo_robot_python_ros_wrapper.ros_wrapper import * robot = NiryoRosWrapper() robot.led_ring.solid(color=[255, 255, 255])
Manages sound
Example:
from niryo_robot_python_ros_wrapper.ros_wrapper import * robot = NiryoRosWrapper() robot.sound.play(sound.sounds[0])
Calculate the pose by a relative movement (x,y,z,roll,pitch,yaw) in the frame (frame_name)
:param frame_name:, name of the frame :type frame_name : str :param offset: list[x, y, z, roll, pitch, yaw] :type offset: list[6*float] :return: status, message :rtype: (int, str)
Calculate the pose (x,y,z,roll,pitch,yaw) in the frame (frame_name)
:param frame_name:, name of the frame :type frame_name : str :param x: :type x: float :param y: :type y: float :param z: :type z: float :param roll: :type roll: float :param pitch: :type pitch: float :param yaw: :type yaw: float :return: point, rotation :rtype: (Position, RPY)
Call service to calibrate motors then waits for its end. If failed, raises NiryoRosWrapperException
| Parameters | |
| calib | 1 for auto-calibration & 2 for manual calibration |
| Returns | |
| (int, str) | status, message |
def __execute_trajectory_from_formatted_poses(self, list_poses, dist_smoothing=0.0): ¶
Undocumented
Executes Move pose action
| Parameters | |
| cmd | Command Type |
| *pose | tuple corresponding to x, y, z, roll, pitch, yaw |
| Returns | |
| (int, str) | status, message |