you can use scipy as of today. However, there is a small problem currently in the NRP that sometimes cause errors when the import is done outside a TF body. This means, you could simply import scipy inside the TF method body. Doing that will import scipy only once, so it is not as critical for performance as it may seem.
For example, I just hacked an example usage into the TF to transmit spike information to the robot controller in the very basic Husky experiment. This is the code:
@nrp.MapSpikeSink("left_wheel_neuron", nrp.brain.actors, nrp.leaky_integrator_alpha)
@nrp.MapSpikeSink("right_wheel_neuron", nrp.brain.actors, nrp.leaky_integrator_alpha)
def linear_twist(t, left_wheel_neuron, right_wheel_neuron):
The transfer function which calculates the linear twist of the husky robot based on the
voltage of left and right wheel neuron.
:param t: the current simulation time
:param left_wheel_neuron: the left wheel neuron device
:param right_wheel_neuron: the right wheel neuron device
:return: a geometry_msgs/Twist message setting the linear twist fo the husky robot movement.
linear=geometry_msgs.msg.Vector3(x=20.0 * min(left_wheel_neuron.voltage, right_wheel_neuron.voltage), y=0.0,
z=0.0), angular=geometry_msgs.msg.Vector3(x=0.0, y=0.0, z=100.0 * (
right_wheel_neuron.voltage - left_wheel_neuron.voltage)))
What this code does, it simply prints out the version information from the scipy library that is supported in the platform (which is 0.17.1) to the client logger.
Nevertheless, we are working to fix this issue (that the import should be inside the method body) and make the integration of scipy available without any such a workaround.