You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I tried to use rostopic pub from roslaunch, I found that rostopic pub could not parse a nested message format with spaces and indents.
But, it depends on depth of nests in a message.
For example, this one is OK: <node name="header_publisher" pkg="rostopic" type="rostopic" args="pub -s /header std_msgs/Header "{'seq': 0, 'stamp':{'secs': 0, 'nsecs': 0}, 'frame_id':'map'}"" />
However, this one does not work if I put any spaces:
When I tried to use rostopic pub from roslaunch, I found that rostopic pub could not parse a nested message format with spaces and indents.
But, it depends on depth of nests in a message.
For example, this one is OK:
<node name="header_publisher" pkg="rostopic" type="rostopic" args="pub -s /header std_msgs/Header "{'seq': 0, 'stamp':{'secs': 0, 'nsecs': 0}, 'frame_id':'map'}"" />
However, this one does not work if I put any spaces:
The codes above is the working ver. When I placed some spaces and indents to improve its readability, it caused the error below.
Any work around?
Thanks.
===== Error Log =====
process[initialpose_publisher-5]: started with pid [73296]
Usage: rostopic pub /topic type [args...]
rostopic: error: Argument error: while parsing a flow node$0 $ @ /opt/ros/noetic/lib/rostopic/rostopic pub -s /initialpose geometry_msgs/PoseWithCovarianceStamped { 'header': { 'seq': 0, 'stamp': { 'secs': 0, 'nsecs': 0 }, 'frame_id': 'map' }, 'pose': { 'pose': { 'position': { 'x': 0.0, 'y': 0.0, 'z': 0.0 }, 'orientation': { 'x': 0.0, 'y': 0.0, 'z': 0.0, 'w': 1.0 } }, 'covariance': [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] } } __name:=initialpose_publisher __log:=/home/y-tanaka/.ros/log/78b350fe-5ba2-11ee-b6d5-ef45c49d4694/initialpose_publisher-5.log].
expected the node content, but found ''
in "", line 1, column 2:
{
^
[initialpose_publisher-5] process has died [pid 73296, exit code 2, cmd bash -c sleep 1.0;
log file: /home/y-tanaka/.ros/log/78b350fe-5ba2-11ee-b6d5-ef45c49d4694/initialpose_publisher-5*.log
The text was updated successfully, but these errors were encountered: