CentraleNantesROV / bluerov2

BlueROV2 for ROS2 + ignition
Apache License 2.0
11 stars 4 forks source link

Clarifications about PID Controller #2

Closed Irrelev4nt13 closed 5 months ago

Irrelev4nt13 commented 5 months ago

Hello, I installed the PID Controller as you mentioned in the instructions. Everything is working perfectly. I'm able to move the robot through the GUI both in position and orientation. I tried to take full control through another script but I was unsuccessful. I tried publishing a PoseStamped message but the pid launch was overwriting my messages due to faster publishing time.

Is it possible somehow to launch the pid controller because it provides the all the necessary tools for the thrusters but be able to send my messages for PoseStamped and TwistStamped?. Ideally I would like to only send PoseStamped messages and the TwistStamped being calculated like in pid controller.

Thanks in advance

oKermorgant commented 5 months ago

Hi,

Sure, just launch cascaded_pids_launch.py with option sliders:=False. The PIDs will still subscribe to cmd_pos and cmd_vel except that no node will be publishing them.

Note that PID tuning is approximate, the goal is to let people test their controllers or path trackers.

Irrelev4nt13 commented 5 months ago

So I should make sure that both cmd_pos and cmd_vel get the necessary values in order for the bluerov to go into a specific location and stop there? I executed the previous script, which contained only PoseStamped messages, and the robot didn't go to the position either stopped somewhere. I'm guessing it's due to the lack of cmd_vel.

oKermorgant commented 5 months ago

Probably auv_control lacks documentation. You have to fill the header.frame_id to indicate in which frame the reference pose is defined. Typically this would be world but there are applications where the reference pose is relative to another frame.

Note that if you give bluerov2/base_link then you can never reach the reference unless it is null.

Irrelev4nt13 commented 5 months ago

I had defined the frame: msg.header.frame_id = "world" so probably it's something else.