0
$\begingroup$

Rosanswers logo

I am currently writing a node for the EV3 which should automatically detect a motor on the port of the EV3 and setup the right control for it (I have a node which currently works for the sensors which does that). The EV3 features 4 motor ports, which can but do not have to be connected. I would start 4 nodes, one for each port and let them wait for the motors to appear and then create the interfaces. I plan to limit the interaction with the user and the brick so that the user can develop his program on the computer and doesn't have to upload anything to the brick and just needs to plug the sensors and motors and will automatically get the interfaces over network. The only thing needed to set then, would be the rosmaster and the network (SSID / PW - if wireless).

Does it make sense to use ros_control in this case?

If yes: I checked also checked out the JointStateHandle class. It features the functions getposition, getspeed and geteffort. Would it make sense that I create a class based on JointStateHandle, which directly calls the port driver to obtain these values from the drivers file in /sys, or do I need to do it in the realtime loop and set the values of this class?

Currently I do not have a real time kernel on the EV3, does ros_control also run without an realtime kernel?

I am also currently searching for a simple example for ros_control. I tried the tutorial but, well some parts of the example are missing. I also checked out the PR2 code. I found the controller class header, but I did not find the real code which actually is controlling the motors.

A very very simple example would be really nice. It does not need to be a full robot at all, just a joint which prints something on the console like "speed set to X" or "position set to Y" would do the job I think. Just something to copy which works so that one can have an smooth start. Is there something like this somewhere? Or did I miss it somewhere?


Originally posted by cyborg-x1 on ROS Answers with karma: 1376 on 2015-11-11

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Well I found some more stuff for it now and I made a little working example, well sharing is caring, here you go:

https://github.com/cyborg-x1/ros_control_test

(Only thing not working is somehow the covariance matrix for the Imu sensor, It just takes one value for me in the message.)

I read the code there but it actually should work, wonder why it does not ...

My other questions: Yep it seems to run without realtime kernel. I think now, after I completely saw the setup and everything, it is suitable for my purpose.


Originally posted by cyborg-x1 with karma: 1376 on 2015-11-12

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.