Ask Your Question
0

joint state publisher dies, cannot attach wheels with continuous joint

asked 2019-10-17 04:21:37 -0600

chillbird gravatar image

updated 2019-10-17 04:40:57 -0600

gvdhoorn gravatar image

Hi,

I am currently trying to create a simple differential drive robot model with 2 wheels and 2 caster wheels, but I cannot attach the wheels to the chassis with continuous/revolute joints and I do not get the transforms of course, but I can connect them with fixed joints and I also get the correct transforms with the fixed joints.

I am using ros melodic with Ubuntu 18.04.3 LTS on VM 6.0.12

  • /rosdistro: melodic
  • /rosversion: 1.14.3

Here is the error message I get:

Error Message

SUMMARY

PARAMETERS 
* /joint_state_publisher/use_gui: True 
* /robot_description: <?xml version="1....
* /rosdistro: melodic
* /rosversion: 1.14.3

NODES 
/ joint_state_publisher (joint_state_publisher/joint_state_publisher)
 robot_state_publisher (robot_state_publisher/state_publisher) 
 rviz (rviz/rviz)

auto-starting new master 
process[master]: started with pid [18519] 
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 2a1bb272-f0b9-11e9-b0ed-080027935df5 
process[rosout-1]: started with pid [18530] 
started core service [/rosout] 
process[joint_state_publisher-2]: started with pid [18533] 
process[robot_state_publisher-3]: started with pid [18538] 
process[rviz-4]: started with pid [18539] 
Traceback (most recent call last): File "/opt/ros/melodic/lib/joint_state_publisher/joint_state_publisher", line 474, in jsp = JointStatePublisher() 
File "/opt/ros/melodic/lib/joint_state_publisher/joint_state_publisher", line 149, in init robot = xml.dom.minidom.parseString(description) 
File "/usr/lib/python2.7/xml/dom/minidom.py", line 1928, in parseString return expatbuilder.parseString(string) 
File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 940, in parseString return builder.parseString(string) 
File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 223, in parseString parser.Parse(string, True) 
UnicodeEncodeError: 'ascii' codec can't encode character u'\u202c' in position 5988: ordinal not in range(128) [joint_state_publisher-2] process has died [pid 18533, exit code 1, cmd /opt/ros/melodic/lib/joint_state_publisher/joint_state_publisher __name:=joint_state_publisher __log:=/home/user/.ros/log/2a1bb272-f0b9-11e9-b0ed-080027935df5/joint_state_publisher-2.log]. log file: /home/user/.ros/log/2a1bb272-f0b9-11e9-b0ed-080027935df5/joint_state_publisher-2*.log

URDF file

<?xml version="1.0" ?>
<robot name="mybot">

  <link name="base_footprint"/>

  <joint name="base_joint" type="fixed">
    <parent link="base_footprint"/>
    <child link="chassis" />
    <origin xyz="0 0 0.010" rpy="0 0 0"/>
  </joint>

  <link name="chassis">
    <collision name="base_collision">
      <origin rpy="0 0 0" xyz="0 0 0.35"/>
      <geometry>
        <box size="1 1.8 0.4"/>
      </geometry>
    </collision>
    <visual name="base_visual">
      <origin rpy="0 0 0" xyz="0 0 0.35"/>
      <geometry>
        <box size="1 1.8 0.4"/>
      </geometry>
    </visual>
    <collision name="l_side_collision">
      <origin rpy="0 0 0" xyz="-0.475 0 1.18"/>
      <geometry>
        <box size="0.05 1.8 2.0"/>
      </geometry>
    </collision>
    <visual name="l_side_visual">
      <origin rpy="0 0 0" xyz="-0.475 0 1.18"/>
      <geometry>
        <box size="0.05 1.8 2.0"/>
      </geometry>
    </visual>
    <collision name="r_side_long_collision">
      <origin rpy="0 0 0" xyz="0.475 0.45 1.18"/>
      <geometry>
        <box size="0.05 0.9 2.0"/>
      </geometry>
    </collision>
    <visual name="r_side_long_visual">
      <origin rpy ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-10-17 04:44:20 -0600

gvdhoorn gravatar image

updated 2019-10-17 05:21:31 -0600

It's very likely this has nothing to do with continuous or fixed joints:

UnicodeEncodeError: 'ascii' codec can't encode character u'\u202c' in position 5988: ordinal not in range(128)

\u202c is (according to this random unicode website) a "POP DIRECTIONAL FORMATTING" character.

And it goes on to mention that this character is often used in .pdf files.

Did you by any chance copy some limits or other pieces of text from a .pdf into your .urdf?

If so, that is most likely where the problem is.

It's all parsed as ASCII text, so you'll need to make sure there are no extended or UTF characters in your .urdf. Otherwise, you'll get (variants) of the error message you posted.


Edit: according to this SO question, you could use the following pgrep command to search for the non-ASCII characters:

grep --color='auto' -P -n "[\x80-\xFF]" /path/to/your/file.urdf

or:

grep --color='auto' -P -n "[^\x00-\x7F]" /path/to/your/file.urdf
edit flag offensive delete link more

Comments

thank soo much!

chillbird gravatar imagechillbird ( 2019-10-17 07:10:11 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2019-10-17 04:20:01 -0600

Seen: 26 times

Last updated: Oct 17