ROS LinuxCNC Link

More
5 years 7 months ago #203798 by andypugh
Replied by andypugh on topic ROS LinuxCNC Link

thefabricator03 wrote: I would like to create a Python based programming language for controlling the robots rather than G-Code. Tormach are doing this with their new robot. Would I have to write a new interpreter for this?


A new interpreter would be one way. LinuxCNC supports pluggable interpreters.

An alternative is to send "canonical commands" direct from the Python. (this might be considered an interpreter...)

There is example code that does that here:

github.com/LinuxCNC/linuxcnc/blob/andypu...python/remap.py#L441

However: I haven't figured out how to access the emccanon module outside of a G-code remap (but have never needed to, so have not looked so hard). Generally Python routines send G-code through the MDI interface.

The emccanon source code is probably the best reference to the available commands:
github.com/LinuxCNC/linuxcnc/blob/master...74ngc/canonmodule.cc
There is a sample pluggable interpreter that uses the same commands, try the sample config sim-axis-canterp for an example.
Sending G-code as MDI is covered here: linuxcnc.org/docs/2.8/html/config/python-interface.html
The following user(s) said Thank You: thefabricator03

Please Log in or Create an account to join the conversation.

  • thefabricator03
  • Topic Author
  • New Member
  • New Member
More
5 years 7 months ago #203799 by thefabricator03
Replied by thefabricator03 on topic ROS LinuxCNC Link
Does LinuxCNC also support plug able trajectory planners?

ROS is not a black box, rather a framework of libraries. It has trajectory planers purpose built for robots. Could I use the LinuxCNC framework but substitute the default planner for a robot specific one?

Please Log in or Create an account to join the conversation.

More
5 years 7 months ago #203800 by andypugh
Replied by andypugh on topic ROS LinuxCNC Link

thefabricator03 wrote: Does LinuxCNC also support plug able trajectory planners?

ROS is not a black box, rather a framework of libraries. It has trajectory planers purpose built for robots. Could I use the LinuxCNC framework but substitute the default planner for a robot specific one?


What is the output of the ROS planner? If it was waypoints on a 1mS clock (realtime) then you could connect it to output devices in LinuxCNC HAL.

Please Log in or Create an account to join the conversation.

  • thefabricator03
  • Topic Author
  • New Member
  • New Member
More
5 years 7 months ago #203801 by thefabricator03
Replied by thefabricator03 on topic ROS LinuxCNC Link
I am not sure at this point but I will keep that in mind.

Please Log in or Create an account to join the conversation.

More
5 years 7 months ago - 5 years 7 months ago #203804 by Grotius
Replied by Grotius on topic ROS LinuxCNC Link
Hi,

If you could post the examples in this thread when you get a spare minute I am sure it will help more that just myself.
I accidentaly whiped one of my usb's last week when i left it in the pc, when doing writing a iso to usb.
Begin next week i can download the python examples from a production machine.

Does LinuxCNC also support plug able trajectory planners?
This is a pain in the ass. :laugh:
If it was so. We could load userspace trayectory planners, wich can do amazing stuff. Then you could do motion profiles
for humanoid robot's etc, Or exotic dmg-mori profiles.

If it was waypoints on a 1mS clock (realtime) then you could connect it to output devices in LinuxCNC HAL.

Most handy is to connect to the stepgen and use the stepgen as pid. Then the waypoints may have a non realtime interval.
The stepgen kernel module does the realtime thing.

The stepgen tuning is important. For robot's there is a mathamatical thing to consider.
When motor 'a' has a acc of 10 and motor 'b' has a acc of '5' with the same reduction, the lineair path isn't correct.
A fix for this is calulate the ratio and sent the 'acc' value for each motor motion to hal.

I am curious if Ros has this important issue build in.
Last edit: 5 years 7 months ago by Grotius.
The following user(s) said Thank You: thefabricator03

Please Log in or Create an account to join the conversation.

More
5 years 7 months ago #203812 by Grotius
Replied by Grotius on topic ROS LinuxCNC Link
One thing about Ros. It uses kdl kinematics.
This library has a iteration value that can be set. For example 120.
That is performing 120 calculation's to optimize the inverse kinematics.

This will result that a cyclustime of 1ms is not possible. Therefore the stepgen as pid is
imporant to take away gap's between the iterations.
The following user(s) said Thank You: thefabricator03

Please Log in or Create an account to join the conversation.

Time to create page: 0.297 seconds
Powered by Kunena Forum