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
The libraries will build up to ignition-physics. To build ign-rendering and the libraries that depend on it needs a larger number of changes to the Bazel build files for ogre2, and to be useful this will need to be updated to ogrev2.2 with Metal support.
For example the publisher from the ign-transport Messages tutorial looks like this in Python:
importtimefromignition.msgs.stringmsg_pb2importStringMsgfrompython_ignition.ignition_transportimportAdvertiseMessageOptionsfrompython_ignition.ignition_transportimportNodefrompython_ignition.ignition_transportimportPublisherdefmain():
# Create a transport node and advertise a topicnode=Node()
topic="/foo"msg_type_name=StringMsg.DESCRIPTOR.full_namepub_options=AdvertiseMessageOptions()
pub=node.advertise(topic, msg_type_name, pub_options)
ifpub.valid():
print("Advertising {} on topic[{}]".format(msg_type_name, topic))
else:
print("Error advertising topic [{}]".format(topic))
# Prepare the messagemsg=StringMsg()
msg.data="hello"try:
whileTrue:
ifnotpub.publish(msg):
breakprint("Publishing hello on topic[{}]".format(topic))
time.sleep(1.0)
exceptKeyboardInterrupt:
passif__name__=="__main__":
main()
It's a bit fiddly to assemble at present because I have not updated the bazel.repos file which is required from macOS. On Ubuntu you should only need the external build file ign-msgs9.BUILD, but I have not tested on that platform.
The message build files need a clean up and macros to generate the protobuf binding rules, but at this stage I'm trying to scope the tasks to get the other libraries working and finish the transport bindings, so will get back to that later on.
Desired behaviour
Build the ignition libraries with Bazel on macOS.
Alternatives considered
Not applicable
Implementation suggestion
Prototype changes to Bazel build files in the following forks - these are macOS only at present.
The Bazel build for these libraries do not require changes
The libraries will build up to
ignition-physics
. To buildign-rendering
and the libraries that depend on it needs a larger number of changes to the Bazel build files forogre2
, and to be useful this will need to be updated toogrev2.2
with Metal support.Additional context
See https://community.gazebosim.org/t/python-bindings-for-gazebo-ignition/360/12?u=srmainwaring
The text was updated successfully, but these errors were encountered: