Hello My friends.
I need your help to proceed my research with CM.
What I want to do is to use neural net(NN) in python as control input(steer or trq) maker.
To do so, I need to train the NN in the python with Reinforcement learning(RL).
The necessary properties to train with RL, I think to extract the state of the car from CM and
push the control input from python each time step (or user defined time step).
And as I know, to exchange data at each time step, the c code based cycle control, CM4SLX (also controlled by python as well) and the ROS as the middleware are the supported means.
My choice is to use the ROS. But I want to know the possibility to execute RL.
-
Is it possible to control the CM by external node?
The node that contains NN and RL algorithm need the fully control ability of the simulation like start, restart or step.
For example, if external node give “reset” topic to CM node, then, CM node stop the simulation and restart with initial values. -
Is it possible to pause the CM while train function and NN fead forward function is running in external node?
It is extended question of above one. In the documentation of the CMRosIF, I saw the topic of synchronization.
I think the data triggered synchronization is what i’m looking for.
However, the doc says, the CM node just wait for the expected msg during received cycle.
I want to make the simulation stop until it get msg from external node. -
Is it possible to use code generation and ROS in same project?
In my research, the RL is some kind of compensator of the conventional controller designed on the Simulink.
So the code generated plug in model need to be included in CM simulation.
I know how to code generate, however, when I create the CMRosIF extended project, the code generation on simulink fails. (with no code generation information file error) Is it right conclude that the code generated plug in module is unable with ROS?
My lack of the knowledge of ROS and cpp makes my research very hardcore
Any advices or opinions are very welcome to me.
Thank you for reading.