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

Difficulties in visual tracking in Ros-by-example book

asked 2017-10-19 17:39:33 -0500

Abdu gravatar image

updated 2017-10-20 07:36:51 -0500

Hi Rossers

I am stack over the flow, I need help plz, I don't know where I am mistaken.

I have Phantomx pincher robotic arm (with 5 dynamixel 12ax servos) connected with arbotix-m board, I am using ros indigo.

I am following this ros-by-example tutorial and this repo. In order to control the first servo (id = 1) based on the motion of coloured object that should be detected by webcam. I want the servo's id 1 rotate when the object is not in the centre of x-axis. For now, I want to get one servo rotating first, then I will consider y-axis for another servo.

The tutorial explains how to control the motion of the pan and tilt head servos. I am trying to consider the pan servo with my first servo.

I did the following :-

1- To get the video stream and detect the object based on colour and send the topic /roi which contains object's position.

roslaunch rbx1_vision usb_cam.launch
roslaunch rbx1_vision camshift.launch

2- To fire up the arbotix-m,

roslaunch rbx1_dynamixels arbotix.launch

I can also see the arm in rviz, and I can move the servo (id 1) individually rostopic pub -1 /head_pan_joint/command std_msgs/Float64 -- 1.0, it moves in rviz as well, it means there's real connection with the actual arm.

3- To launch the head tracking node (which should be my first servo tracking node, since I consider the pan_head_joint is my servo id 1). This video shows the demo for the tutorial work.

roslaunch rbx1_dynamixels head_tracker.launch

I got this out put

[INFO] [WallTime: 1508448519.996313] Waiting for joint controllers services...

When I run rostopic info /head_pan_joint/command I can see head_pan_joint is already ok.

imr@IMR-PC:~$ rostopic info /head_pan_joint/command 
Type: std_msgs/Float64

Publishers: 
 * /head_tracker (http://localhost:38610/)

Subscribers: 
 * /arbotix (http://localhost:41637/)

And my first servo is not moving, I do not know where I am mistaken, what to check with the third step as I mentioned above, I guess there's some thing wrong there. Please tell me !!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-10-23 16:57:08 -0500

jorge gravatar image

Hi, cannot try by myself, as I have now a quite different configuration. But looking at head_tracker code, looks like it tries to subscribe to a service that doesn't exists: torque_enable. Arbotix provides a service for each servo named just "enable"... looks like a reasonable bet that they are the same. So you can try to remap from torque_enable to torque.

Or given that ros-by-example code is several years old, probably better fork it so you can update those parts that had become obsolete, something that the author will probably appreciate.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2017-10-19 17:39:33 -0500

Seen: 251 times

Last updated: Oct 23 '17