ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

At the end I chose to create a global queue where any velocity command (usually coming from different threads) is stored. The velocity commands are sequentially processed by the queue (the next velocity command is applied only when the previous is checked to be effective). In this way, each velocity commands can independently change rotational or linear velocity by reading the current values of the unchanged velocity component and resending them with the new full velocity command (i.e. rotational+linear).

You may comment about how elegant or efficient this solution is. I am sure it can be bettered, but at the moment works.

Sorry for delayed answer post. I was busy. And thanks to Stefan for nice suggestions.

At the end I chose to create a global queue where any velocity command (usually coming from different threads) is stored. stored before being executed. The velocity commands are sequentially processed executed by dequeuing — the queue (the next velocity command is applied only when the previous is checked to be effective). effective. In this way, each velocity commands can independently change rotational or linear velocity by reading the current values of the unchanged velocity component and resending them with the new full velocity command (i.e. rotational+linear).

You may comment about how elegant or efficient this solution is. I am sure it can be bettered, but at the moment works.moment, with only two agents, works ok.

Sorry for delayed answer post. I was busy. And thanks to Stefan for nice suggestions.

At the end I chose to create a global queue where any velocity command (usually coming from different threads) is stored before being executed. The velocity commands are sequentially executed by dequeuing — the next velocity command is applied only when the previous is checked to be effective. In this way, each velocity commands can independently change rotational or linear velocity by reading the current values of the unchanged velocity component and resending them with the new full velocity command (i.e. rotational+linear).

You may comment about how elegant or efficient this solution is. I am sure it can be bettered, but at the moment, with only two agents, works ok.

Sorry for delayed answer post. I was busy. And thanks to Stefan @StefanKohlbrecher for nice suggestions.

At the end I chose to create a global queue where any velocity command (usually coming from different threads) is stored before being executed. The velocity commands are sequentially executed by dequeuing — the next velocity command is applied only when the previous is checked to be effective. In this way, each velocity commands can independently change rotational or linear velocity by reading the current values of the unchanged velocity component and resending them with the new full velocity command (i.e. rotational+linear).

You may comment about how elegant or efficient this solution is. I am sure it can be bettered, but at the moment, with only two agents, works ok.

Sorry for delayed answer post. I was busy. And thanks to @StefanKohlbrecher for nice suggestions.