225tend = QDateTime::currentMSecsSinceEpoch();
226text_message_html +=
"
"+ QString(
"Inverse Kinematics: %1 micro seconds (all solutions)").arg(((
double)(tend-tstart)*1000)/ntests, 0,
'f', 2);
228text_message_html += +
"
No robot available to run Kinematic tests";
233qDebug() << text_message_html;
238qDebug() <<
"Available items in the current station: "<< item_list_names;
244
foreach(
Itemitm, item_list){
246
if(!ItemValid(item_parent)){
248text_message_html += QString(
"
%1 (station)").arg(itm->
Name());
250text_message_html += QString(
"
%1 -> parent: %2").arg(itm->
Name()).arg(item_parent->
Name());
256QTextEdit *text_editor =
newQTextEdit(
"Plugin timing summary");
257QDockWidget *dockwidget = AddDockWidget(
MainWindow, text_editor,
"Dock Plugin timing summary");
258text_editor->setHtml(text_message_html);
284QDesktopServices::openUrl(QUrl(
"//www.sinclairbody.com/CreatePlugin"));
TypeEvent
Event types for PluginEvent function.
@ EventAbout2ChangeStation
The current RoboDK station is about to loose focus because the user requested to open a new station (...
@ EventAbout2CloseStation
@ EventMoved
Moved event: Something has moved, such as a robot, reference frame, object or tool....
virtual QString PluginName()=0
Return the plugin name. Try to be creative and make sure the name is unique.
TypeClick
Types of clicks for PluginItemClick function.
The Item class represents an item in RoboDK station. An item can be a robot, a frame,...
@ ITEM_TYPE_ROBOT
Item of type robot (.robot file)
@ ITEM_TYPE_OBJECT
Item of type object (.stl, .step or .iges for example)
virtual int Type()=0
Item type (object, robot, tool, reference, robot machining project, ...)
virtual tJoints SolveIK(const Mat &pose, const tJoints *joints_close=nullptr, const Mat *tool_pose=nullptr, const Mat *reference_pose=nullptr)=0
计算了th的逆运动学e specified robot and pose. The joints returned are the closest...
virtual QString Name()=0
Returns the name of an item. The name of the item is always displayed in the RoboDK station tree
virtual Mat SolveFK(const tJoints &joints, const Mat *tool_pose=nullptr, const Mat *reference_pose=nullptr)=0
Computes the forward kinematics of the robot for the provided joints. The tool and the reference fram...
virtual Item Parent()=0
Return the parent item of this item
virtual QList< tJoints > SolveIK_All(const Mat &pose, const Mat *tool_pose=nullptr, const Mat *reference_pose=nullptr)=0
计算了th的逆运动学e specified robot and pose. The function returns all available ...
virtual tJoints Joints()=0
Returns the current joints of a robot or the joints of a target. If the item is a cartesian target,...
This class is the iterface to the RoboDK API. With the RoboDK API you can automate certain tasks and ...
virtual Item ItemUserPick(const QString &message="Pick one item", int itemtype=-1)=0
Shows a RoboDK popup to select one object from the open RoboDK station. An item type can be specified...
virtual void ShowMessage(const QString &message, bool popup=true)=0
Show a message in RoboDK (it can be blocking or non blocking in the status bar)
virtual Item getActiveStation()=0
Returns the active station item (station currently visible).
virtual QStringList getItemListNames(int filter=-1)=0
Returns a list of items (list of names or Items) of all available items in the currently open station...
virtual QList< Item > getItemList(int filter=-1)=0
Returns a list of items (list of names or pointers) of all available items in the currently open stat...
The Mat class represents a 4x4 pose matrix. The main purpose of this object is to represent a pose in...
virtual void PluginEvent(TypeEvent event_type) override
This function is called every time there is a new RoboDK event such as rendering the screen,...
void callback_information()
Called when the information button/action is selected.
QDockWidget * dock_robotpilot
Pointer to the docked window.
void callback_robotpilot()
Called when the robot pilot button/action is selected.
FormRobotPilot * form_robotpilot
Pointer to the robot pilot form.
QToolBar * toolbar1
Pointer to the customized toolbar.
void callback_help()
Called when the user select the button/action for help.
virtual void PluginUnload() override
This function is called once only when the plugin is being unloaded.
QMainWindow * MainWindow
RoboDK's main window pointer.
QStatusBar * StatusBar
RoboDK's main status bar pointer.
void callback_robotpilot_closed()
Called when the robot pilot window is closed (event triggered by the dock window)
QAction * action_robotpilot
Open robot pilot form action. callback_robotpilot is triggered with this action. Actions are required...
QMenu * menu1
Pointer to the customized menu.
RoboDK * RDK
Pointer to the RoboDK API interface.
virtual QString PluginCommand(const QString &command, const QString &value) override
Specific commands can be passed from the RoboDK API. For example, a parent application can rely on a ...
virtual bool PluginItemClick(Item item, QMenu *menu, TypeClick click_type) override
This function is called every time a new context menu is created for an item.
QAction * action_help
Open help action. callback_help is triggered with this action. Actions are required to populate toolb...
virtual Q_PLUGIN_METADATA(IID "RoboDK.IAppRoboDK") public QString PluginLoad(QMainWindow *mw, QMenuBar *menubar, QStatusBar *statusbar, RoboDK *rdk, const QString &settings="") override
Load the plugin. This function is called only once when the plugin is loaded (or RoboDK is started wi...
virtual void PluginLoadToolbar(QMainWindow *mw, int icon_size) override
This function is called every time the toolbar is set up. This function is called at least once right...
QAction * action_information
Information action. callback_information is triggered with this action. Actions are required to popul...
The tJoints class represents a joint position of a robot (robot axes).