I am using Gazebo simulation. I want to connect arduino to my model in Gazebo. I used following coding in the gazebo launch script:
<node pkg="rosserial_python" type="serial_node.py" name="rosserial" output="screen">
<param name="port" value="/dev/ttyACM0" />
<param name="baud" value="57600" />
</node>
when I launch the gazebo with roslaunch command the following error apeares:
ERROR: cannot launch node of type [rosserial_python/serial_node.py]: can't locate node [serial_node.py] in package [rosserial_python]
Does anybody know about my problem?
Try this:
<arg name="port" default="/dev/ttyACM0" />
<node name="serial_node" pkg="rosserial_python" type="serial_node.py">
<param name="port" value="$(arg port)"/>
<param name="baud" value="57600" />
</node>
Related
I need to pass the username to a link in a doclibaction. I am using share alfresco 4.2.
The following section is from my share-config-custom.xml file.
<action id="document-edit-xmlapp" type="link" label="actions.document.document-edit-xmlapp">
<param name="href">http://alfresco.eb.com/oxygen-sdk-sample-webapp/app/oxygen.html?url=webdav-http://alfresco.eb.com/alfresco{webdavUrl}&showSave=true&author={?this is what I need?}</param>
<permissions>
<permission allow="true">Write</permission>
</permissions>
<evaluator>evaluator.doclib.action.checkInXMLEdit</evaluator>
</action>
I need to pass the username to the author query parameter. Any idea on how to do this?
Thanks
Mark
My final section of code that worked was
<action id="document-edit-xmlapp" type="link" label="actions.document.document-edit-xmlapp">
<param name="href">http://alfresco.eb.com/oxygen-sdk-sample-webapp/app/oxygen.html?url=webdav-http://alfresco.eb.com/alfresco{webdavUrl}&showSave=true&author={node.properties.modifier.userName}</param>
<permissions>
<permission allow="true">Write</permission>
</permissions>
<evaluator>evaluator.doclib.action.checkInXMLEdit</evaluator>
</action>
I've tried to create a simple project using AllJoyn to expose an interface to my Garage Door via a Raspberry Pi 2 running Windows 10 IoT.
The relevant Introspection XML file is as follows:
<node xmlns:xsi="http://www.w3.org/2001/XMLSchemainstance" xsi:noNamespaceSchemaLocation="https://allseenalliance.org/schemas/introspect.xsd">
<interface name="com.hastarin.GarageDoor">
<!--<annotation name="org.alljoyn.Bus.Secure" value="true" />-->
<description language="en">Interface for controlling a garage door.</description>
<property name="IsOpen" type="b" access="read">
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="true"/>
<description language="en">Is TRUE if the door is open.</description>
</property>
<property name="IsPartiallyOpen" type="b" access="read">
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="true"/>
<description language="en">Is TRUE if the door is only partially open for air flow.</description>
</property>
<method name="Open">
<description language="en">Opens the door if it's closed.</description>
<argument name="partialOpen" type="b" direction="in">
<description language="en">
If TRUE, the door will only be partially opened to allow air flow.
If FALSE, the door will be fully opened.
</description>
</argument>
</method>
<method name="Close">
<description language="en">Close the door if it's open.</description>
</method>
<method name="PushButton">
<description language="en">Will trigger the push button on the garage door.</description>
</method>
</interface>
</node>
Unfortunately the generated service interface does not include the argument for the Open method.
public interface IGarageDoorService
{
IAsyncOperation<GarageDoorOpenResult> OpenAsync([In] AllJoynMessageInfo info);
IAsyncOperation<GarageDoorCloseResult> CloseAsync([In] AllJoynMessageInfo info);
IAsyncOperation<GarageDoorPushButtonResult> PushButtonAsync([In] AllJoynMessageInfo info);
IAsyncOperation<GarageDoorGetIsOpenResult> GetIsOpenAsync([In] AllJoynMessageInfo info);
IAsyncOperation<GarageDoorGetIsPartiallyOpenResult> GetIsPartiallyOpenAsync([In] AllJoynMessageInfo info);
}
The full source code for the project can be found on GitHub:
https://github.com/hastarin/HastPiControl
Can anyone tell me if I'm doing something wrong, or if perhaps this is a limitation of the AllJoyn Studio Extension?
Can anyone suggest a workaround?
I had the same issue. Then I stumbled across an example that used <arg> instead of <argument> for the element name. It worked for me - haven't had a chance to look into it further...
I want to have log messages from each log level go to a different file. From the name, LevelMatchFilter seems like what I want, except it seems to not filter anything from a different level.
I think the following properties should do that using LevelRangeFilter. However, anything sent to the global logger ends up in INFO.log, regardless of the level.
log4j.rootLogger = OFF
# Global level based logs
log4j.logger.global = ALL, Info
log4j.appender.Info=org.apache.log4j.FileAppender
log4j.appender.Info.File=Logs/INFO.log
log4j.appender.Info.layout=org.apache.log4j.PatternLayout
log4j.appender.Info.layout.ConversionPattern=%d [%p] %m%n
log4j.appender.Info.filter.a=org.apache.log4j.filter.LevelRangeFilter
log4j.appender.Info.filter.a.LevelMin=info
log4j.appender.Info.filter.a.LevelMax=info
log4j.appender.Info.filter.a.AcceptOnMatch=true
I also tried using INFO for the values of LevelMin and LevelMax but that had the same results.
What am I doing wrong?
As a side question, is there a way to turn on debugging of the log4cxx configuration when using a property file? I found an option when using an xml file, but none of the obvious translations to properties (debug=true, log4j.debug=true) and any effect.
As of log4cxx 0.10 (and probably earlier), the properties format does not support filters. So the XML configuration (or programmatic configuration) is required.
<?xml version="1.0" encoding="UTF-8" ?>
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="true">
<appender name="Info" class="org.apache.log4j.FileAppender">
<param name="file" value="Logs/INFO.log" />
<param name="append" value="false" />
<!-- If this filter accepts the message, it will be printed. That happens if this is an info message -->
<filter class="org.apache.log4j.filter.LevelMatchFilter">
<param name="levelToMatch" value="INFO" />
<param name="acceptOnMatch" value="true" />
</filter>
<!-- If it is not an info message, this filter will reject it -->
<filter class="org.apache.log4j.filter.DenyAllFilter"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d [%p] %m%n" />
</layout>
</appender>
<root>
<priority value="off" />
</root>
<logger name="global">
<priority value="all" />
<appender-ref ref="Info" />
</logger>
</log4j:configuration>
Im using Unity (3.0) interception to add some crosscutting concerns to my application. Somehow I can't use the MethodSignatureMatchingRule in my configuration getting this error message:
{"The type name or alias MethodSignatureMatchingRule could not be resolved. Please check your configuration file and verify this type name."}
My configuration:
<?xml version="1.0"?>
<unity xmlns="http://schemas.microsoft.com/practices/2010/unity">
<sectionExtension type="Microsoft.Practices.Unity.InterceptionExtension.Configuration.InterceptionConfigurationExtension, Microsoft.Practices.Unity.Interception.Configuration" />
<alias alias="singleton" type="Microsoft.Practices.Unity.ContainerControlledLifetimeManager, Microsoft.Practices.Unity" />
<containers>
<container name="MyContainer">
<extension type="Interception"/>
<interception>
<policy name="EhabAspect">
<matchingRule name="MethodSignatureMatchingRule" type="MethodSignatureMatchingRule">
<constructor>
<param name="methodName" value="Receive" type="string"/>
</constructor>
</matchingRule>
<callHandler ... (omitted)
</policy>
</interception>
<register type="IMyClass" mapTo="MyClass">
<lifetime type="singleton" />
<interceptor type="InterfaceInterceptor"/>
<policyInjection/>
</register>
</container>
</containers>
</unity>
The same configuration with the NamespaceMatchingRule works fine.
My assembly contains a reference to
Microsoft.Practices.EnterpriseLibrary.Common
Microsoft.Practices.Unity
Microsoft.Practices.Unity.Configuration
Any suggestions?
I was facing the same problem here. I solved using the full qualified name of the of the class.
<matchingRule name="AuthorizationMethod" type="Microsoft.Practices.Unity.InterceptionExtension.MethodSignatureMatchingRule, Microsoft.Practices.Unity.Interception">
<constructor>
<param name="methodName" value="Authenticate" type="string"/>
<param name="parameterTypeNames" dependencyName="EmptyArray"/>
</constructor>
</matchingRule>
I am using Spring 3 and attempting to use a JNDI (named) data source with DBCP connection pooling.
I would like to be able to set pool parameters, but my
<bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
</bean>
doesn't support the necessary params:
<!-- Connection Pool settings -->
<param name="maxActive" value="5" />
<param name="maxIdle" value="2" />
<param name="maxWait" value="10000" />
<param name="removeAbandoned" value="true" />
<param name="removeAbandonedTimeout" value="60" />
<param name="logAbandoned" value="true" />
<!-- Purge invalid connections -->
<param name="validationQuery" value="SELECT 1" />
<param name="testOnBorrow" value="true" />
I've googled this extensively, and it looks like it's expected that the container (tomcat) should set these kinds of params for JNDI connections, not the application.
Unfortunately in my situation (cloudbees) I don't have control over tomcat.
Is what I'm attempting even possible?
ok, I've figured out how to do this. For reference, you need to use the Cloudbees SDK's bindings feature:
bees app:bind -a APP_ID -db DB_ID -as DATASOURCE_NAME maxActive=5 maxIdle=2 \
maxWait=10000 removeAbandoned=true removeAbandonedTimeout=60 logAbandoned=true \
validationQuery="SELECT 1" testOnBorrow=true