[ROS2] Import a pure python class from [closed]

asked 2023-06-26 03:11:56 -0600

mirroyal gravatar image

So, let'e say we have a simple python class called Model:

class Model: 
 def __init__(self): 
    pass
 def solver(self,Vf,Vf_dot,p,p_dot,h_1,h_2):
   h1_dot = ... 
   h2_dot=...    
 return  [h1_dot,h2_dot]

What I want to do is to separate this class neatly and when I create ROS2 packages on the side I can call this class create an instance and use it for my application. Is there any elegant way to do it?

edit retag flag offensive reopen merge delete

Closed for the following reason question is off-topic or not relevant. Please see http://wiki.ros.org/Support for more details. by 130s
close date 2023-08-04 12:34:38.656885

Comments

In the given info, I do not see relevance to ros. You might get more traction and useful info on other forums e.g. stackoverflow.com. If this is related to ros please update the question to give more info.

130s gravatar image 130s  ( 2023-08-04 12:35:55 -0600 )edit