I launched the demo of the Abb_irb6640_moveit_config package [..]
demo.launch
is not a launch file you would use for controlling a real robot or for visualising a real robot's state.
It's -- as the name implies -- a demo setup that you may use to test MoveIt's functionality with a particular robot's (urdf) model.
[..] but I am confused on how to control it by reading joint_states.
I'm not sure what you mean by this. JointState
messages are intended to be used to report joint state, not to command it.
Edit:
My aoplogies, I want to use the joint_state feedback data from the physical robot to move the robot model in RViz,simply as a way to visualize what is happening to the real robot.
Ok. That should not be too hard, seeing as you already are publishing JointState
messages.
Components involved in visualising robot state:
- RViz
robot_state_publisher
- a
JointState
publisher - a urdf/xacro for the robot model (more of a passive component, but still)
You wrote #3, ROS provides #1 and #2, ros-industrial/abb
provides #4.
Probably the quickest way to visualise current robot state would be to edit abb_irb6640_support/launch/robot_state_visualize_irb6640_185_280.launch
and comment/remove the section that starts the $(find abb_driver)/launch/robot_interface.launch
file. We don't need it, as your ESP8266 is already publishing JointState
messages (so takes over half the role of abb_driver
). Also comment/remove the line declaring the robot_ip
argument, as you don't need it.
Now start your ESP8266 and then:
roslaunch abb_irb6640_support robot_state_visualize_irb6640_185_280.launch
RViz should come up and show you the current state of the robot (I don't know whether you have that particular variant of the IRB 6640, but that doesn't matter for now, you can fix that later).
NOTE: abb_driver
decouples axes 2 and 3 (here). Without that, JointState
messages won't be correct and the pose of the robot will be reported incorrectly. You'll probably have to do something similar in the code running on your ESP8266.
I have not been able to successfully write serial data to the robot controller, but for some reason I can receive data.
Depending on your ultimate goal, it may be an idea to take a look at ros-industrial/industrial_core#107: that issue asks for a serial transport for industrial_core
. Provided the S4C+ supports sufficient Rapid and with appropriate changes to abb_driver
(ie: make it support a serial connection) you may be able to use the regular infrastructure but then over a serial connection.
No guarantees of course, but if you'd be interested I'd be willing to help.
Edit 2:
Now when I run this in parallel with launching robot_state_visualize after doing what you told me, parts of the model are now white, [..] Looking at the RobotModel Display in Rviz, it tells me there is "No transform from [link_1] to [base_link]" for every link after the base frame.
Your description and screenshot suggest that there is a problem with TF. This is typically ... (more)
out of curiosity: what robot and controller is/are this? Seeing "serial" mentioned I'm guessing the controller doesn't have an ethernet connection available?
Well it has an ethernet connection but I haven't tested it yet. It is an ABB irb6650s with an S4C+ controller, so socket connection is not an option. I've tested with the serial COM ports and I'm able to read joint data from the robot but I still cant send it commands.
is there any chance to get the open_abb_serial_logger because i cant find it anymore on on git