Object Tracker, /roi and spiky /cmd_vel/angular/z

70 views
Skip to first unread message

arminf82

unread,
Sep 30, 2019, 6:26:36 AM9/30/19
to ros-by-example
Hi,

I have an object detector using TensorFlow that publishes a /roi only once per second.
Using the object_tracker.py code, my robot turns/tracks very slow, because
 "If the target is not visible, the robot will stop turning".

It looks like that the published /roi in a rate of once per second is not enough to make my robot
turn.

Checking /cmd_vel/angular/z, I see that the angular velocity is being published in a small spikes pattern,
comparable to a PWM duty-cycle of for example 10%.

My robot only turns when I send cmd_vel commands with a higher frequency,
like when using teleop keyboard and holding the turnkey for some time to
get a duty cycle like pattern of 100% for a short time, so publishing cmd_vel
constantly.

My questions are:
1. What is the best way to make the robot turn at least some degree even when the /roi
message only comes in every second? At the moment it needs around 15-20 cycles to make a 15° turn.
2. Is there an easy way to adapt the current code to turn its heading using /odom /imu (check link)?
e.g.
- Heading of the robot is 0°
- An object is found in the image at 15°
- Turn robot to 15° (regardless if /roi is published?)

(Changing the parameters of gain etc did not really change a lot.)


Reply all
Reply to author
Forward
0 new messages