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

ABB: S4C + IRB6650: How do I visualize an ABB robot's movements in Rviz

asked 2018-12-14 14:00:26 -0500

mikevillan26 gravatar image

updated 2018-12-17 15:24:41 -0500

Forgive me, I am pretty new to ROS, so please excuse any gaps in my knowledge. I have a wireless ESP8266 microcontroller reading joint_state data from an ABB robot through serial connection and it is sending it directly to a remote ros server. I'm able to see the physical robot's live position by using 'rostopic echo joint_states' on the server, but I'm unable to visualize its movements in Rviz. I launched the demo of the Abb_irb6640_moveit_config package but I am confused on how to control it by reading joint_states. I am attempting to use Rviz in conjunction with rosserial's serial_node.py script.

UPDATE:

Thanks to @gdvhoorn ! I was finally able to get the visualization to work. I hadn't mentioned earlier that I was using the rosserial package to publish joint_state msgs using this arduino code https://github.com/mikevillan26/open_abb_serial_logger.git. I had to simply change the joint names I had declared in my code to reflect those of the abb_irb_6640 urdf. From there, I could launch the robot_state_visualize.launch file in the abb_irb6640_support pkg in conjunction with the rosserial_python/serial_node.py/tcp and the model would finally reflect the live movements of my robot.

edit retag flag offensive close merge delete

Comments

I have a wireless ESP8266 microcontroller reading joint_state data from an ABB robot through serial connection

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?

gvdhoorn gravatar image gvdhoorn  ( 2018-12-14 14:21:21 -0500 )edit

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.

mikevillan26 gravatar image mikevillan26  ( 2018-12-14 18:34:55 -0500 )edit

is there any chance to get the open_abb_serial_logger because i cant find it anymore on on git

mues gravatar image mues  ( 2021-06-09 04:12:30 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-12-14 14:20:00 -0500

gvdhoorn gravatar image

updated 2018-12-17 14:03:30 -0500

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:

  1. RViz
  2. robot_state_publisher
  3. a JointState publisher
  4. 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)

edit flag offensive delete link more

Comments

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. I have not been able to successfully write serial data to the robot controller, but for some reason I can receive data.

mikevillan26 gravatar image mikevillan26  ( 2018-12-14 16:54:05 -0500 )edit

So I forgot to mention that the ESP depends on running rosserial_python/serial_node.py/tcp meaning it will not publish joint _state data unless the node is running. 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...

mikevillan26 gravatar image mikevillan26  ( 2018-12-17 11:22:40 -0500 )edit

The robot also appears to be driving into the floor and through itself like here

mikevillan26 gravatar image mikevillan26  ( 2018-12-17 11:31:53 -0500 )edit

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. Note that I have not yet changed anything about the decoupling of axes 2 & 3 as I was confused on how to do it for now so Im wondering if thats the reason

mikevillan26 gravatar image mikevillan26  ( 2018-12-17 11:48:57 -0500 )edit

Here is the arduino code I used for the ESP8266 to send wireless joint_state data to my ros server using the rosserial_python/serial_node/tcp https://github.com/mikevillan26/open_abb_serial_logger.git. I really appreciate all of your help

mikevillan26 gravatar image mikevillan26  ( 2018-12-17 12:26:10 -0500 )edit
1

Just an FYI: if industrial_core had a serial transport and abb_driver was updated to make use of that, your custom ESP8266 code + rosserial would not be needed. Unless you like the wireless aspect of it, of course (but even then: socat).

gvdhoorn gravatar image gvdhoorn  ( 2018-12-17 14:07:51 -0500 )edit
1

Btw: could you please update your original question text with a new section (perhaps call it Edit) and then add the things you describe here in the comments in the edit section?

Also please attach your image to the question directly. I've given you sufficient karma for that.

gvdhoorn gravatar image gvdhoorn  ( 2018-12-17 15:09:51 -0500 )edit

It worked!!! Thank you so much! I will look into industrial_core and see what if I can modify it for my needs!

mikevillan26 gravatar image mikevillan26  ( 2018-12-17 15:25:49 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2018-12-14 14:00:26 -0500

Seen: 530 times

Last updated: Dec 17 '18