Moveit arm show chessboard position Rviz [closed]
I have a 7DOF arm in moveit, which I can display in Rviz and also use for planning. I would like to include a frame to this Rviz model to show where a chessboard is located relative to the camera mounted on the robots gripper.
I have a node which can publish the TF of the detected chessboard, but I'm not sure how to merge with the moveit configuration.
I tired to use in the chess detection node the broadcaster like:
br.sendTransform(tf::StampedTransform(object_transform, ros::Time::now(), "camera_front", "calibration_grid"));
where camera_front
is part of the robot configuration in moveit, and calibration_grid
should show the position of the board relative to the camera front frame.
When I try it Rviz throws a warning:
[ WARN] [1438001098.758415265]: No transform available between frame 'calibration_grid' and planning frame '/base_footprint' (Could not find a connection between 'base_footprint' and 'calibration_grid' because they are not part of the same tree.Tf has two or more unconnected trees.)
Tthis is my moveit.rviz for the arm and the functional rviz setup for the camera solo camera.rviz.
Can anyone explain how can I represent the reference frame of the chessboard relative to the arm (camera front link on the arm)? Somehow I have to tell to Rviz that calibration_grid
is part of the tree but it does not have to be included in the movement planning for the arm.
UPDATE 1:
In RVIZ
some parts of the robot arm are in warning when I load TF, in these links is camera_front
. The warning is:
camera_front No transform from [camera_front] to frame [base_footprint]
. This camera_front
is a link connected to the arm through fixed joints. It seams to be that every link in this chain has this warning massage in Rviz TF.
So, this might be the problem.
When I try to broadcast like
br.sendTransform(tf::StampedTransform(object_transform, ros::Time::now(), "base_footprint", "calibration_grid"));
works well but the position of the chessboard is relative to the base of the arm and not the link where the camera is placed.
UPDAT 2:
Some detailes about the arm configuration before an observation: I connected to the last link of the arm (via fixed joints) a camera_back_of_box
and to this a camera_front
, all these joints (fixed) are also part of the arm group (created in moveit assistant).
Now, if I change in Rviz
the fixed frame to one of this links that hold the camera, than I can see the position of the chessboard, but the reference frames are shifted to the bottom of the robot in the origin of the world.
I think, this problem is due that I have multiple fixed joint is this robotic arm URDF model and if I understand well than the root of the tree should have fixed joint connection to the world. But what if there are more than one fixed joints, could this be the issue?
Update 3:
The RobotState
from moveit has the transform information of all link, just have ...
This should be fairly straightforward. Are you publishing the transformation from calibration_grid to base_footprint?
I'm quit new with TF so I don't realy understand your question.
camera_front
is part of the robot arm which has the base foot print and in link camera_front is the real camera. That is why I try to broadcast like above.I checked in
Rviz
and if I addTF
than in the GUI I have an other warning related to some links to my arm:camera_front No transform from [camera_front] to frame [base_footprint]
. But this code is automatically generated by moveit setup assistant.All the TF frames can be published by any node. just add a static_transform_publisher node to publish the transformation you are looking for.