Skip to content

Commit 33a8496

Browse files
authored
Merge pull request #62 from zsunberg/patch-1
add dots to message imports
2 parents 30bcd49 + 135737f commit 33a8496

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/src/index.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ std_msgs.msg.Header`. After calling `rostypegen()` they can be interacted with
5252
just like regular modules with `import` and `using` statements bringing the
5353
generated type names into the local namespace.
5454

55-
using nav_msgs.msg
55+
using .nav_msgs.msg
5656
import geometry_msgs.msg: Pose, Vector3
5757
p = Path()
5858
v = Vector3(1.1,2.2,3.3)
@@ -129,7 +129,7 @@ and value of the `t` parameter.
129129
Publishing messages is the same as in rospy, except use the `publish` method,
130130
paired with a Publisher object. For example:
131131

132-
using geometry_msgs.msg
132+
using .geometry_msgs.msg
133133
pub = Publisher{PointStamped}("topic", queue_size = 10) #or...
134134
#pub = Publisher("topic", PointStamped, queue_size = 10)
135135
msg = PointStamped()
@@ -148,7 +148,7 @@ callback is invoked. Note that it must be passed as a tuple, even if there is
148148
only a single argument. And again, keyword arguments are directly forwarded. An
149149
example:
150150

151-
using sensor_msgs.msg
151+
using .sensor_msgs.msg
152152
cb1(msg::Imu, a::String) = println(a,": ",msg.linear_acceleration.x)
153153
cb2(msg::Imu) = println(msg.angular_velocity.z)
154154
sub1 = Subscriber{Imu}("topic", cb1, ("accel",), queue_size = 10) #or...
@@ -179,7 +179,7 @@ Message constants may be accessed using `getindex` syntax. For example for
179179
[visualization_msgs/Marker.msg](http://docs.ros.org/api/visualization_msgs/html/msg/Marker.html)
180180
we have:
181181

182-
import visualization_msgs.msg: Marker
182+
import .visualization_msgs.msg: Marker
183183
Marker[:SPHERE] == getindex(Marker, :SPHERE) == 2 # true
184184

185185
## ROS Integration
@@ -215,7 +215,7 @@ republishes them as Points.
215215
using RobotOS
216216
@rosimport geometry_msgs.msg: Point, Pose2D
217217
rostypegen()
218-
using geometry_msgs.msg
218+
using .geometry_msgs.msg
219219

220220
function callback(msg::Pose2D, pub_obj::Publisher{Point})
221221
pt_msg = Point(msg.x, msg.y, 0.0)

0 commit comments

Comments
 (0)