@@ -52,7 +52,7 @@ std_msgs.msg.Header`. After calling `rostypegen()` they can be interacted with
52
52
just like regular modules with ` import ` and ` using ` statements bringing the
53
53
generated type names into the local namespace.
54
54
55
- using nav_msgs.msg
55
+ using . nav_msgs.msg
56
56
import geometry_msgs.msg: Pose, Vector3
57
57
p = Path()
58
58
v = Vector3(1.1,2.2,3.3)
@@ -129,7 +129,7 @@ and value of the `t` parameter.
129
129
Publishing messages is the same as in rospy, except use the ` publish ` method,
130
130
paired with a Publisher object. For example:
131
131
132
- using geometry_msgs.msg
132
+ using . geometry_msgs.msg
133
133
pub = Publisher{PointStamped}("topic", queue_size = 10) #or...
134
134
#pub = Publisher("topic", PointStamped, queue_size = 10)
135
135
msg = PointStamped()
@@ -148,7 +148,7 @@ callback is invoked. Note that it must be passed as a tuple, even if there is
148
148
only a single argument. And again, keyword arguments are directly forwarded. An
149
149
example:
150
150
151
- using sensor_msgs.msg
151
+ using . sensor_msgs.msg
152
152
cb1(msg::Imu, a::String) = println(a,": ",msg.linear_acceleration.x)
153
153
cb2(msg::Imu) = println(msg.angular_velocity.z)
154
154
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
179
179
[ visualization_msgs/Marker.msg] ( http://docs.ros.org/api/visualization_msgs/html/msg/Marker.html )
180
180
we have:
181
181
182
- import visualization_msgs.msg: Marker
182
+ import . visualization_msgs.msg: Marker
183
183
Marker[:SPHERE] == getindex(Marker, :SPHERE) == 2 # true
184
184
185
185
## ROS Integration
@@ -215,7 +215,7 @@ republishes them as Points.
215
215
using RobotOS
216
216
@rosimport geometry_msgs.msg: Point, Pose2D
217
217
rostypegen()
218
- using geometry_msgs.msg
218
+ using . geometry_msgs.msg
219
219
220
220
function callback(msg::Pose2D, pub_obj::Publisher{Point})
221
221
pt_msg = Point(msg.x, msg.y, 0.0)
0 commit comments